Implement Pii Stripper Part 3

The incident request args sets privacy spec. Strip action is optimized
to run once for each type of spec and ready for flush multiple times.
Incident command is updated to take -p option to specify privacy spec.

Bug: 64687253
Test: unit tests written, manually run incident command to test as well
Change-Id: I6753df117f76dc1a5f4d2152baa3fbbf56b490e4
diff --git a/cmds/incidentd/src/Privacy.cpp b/cmds/incidentd/src/Privacy.cpp
index a790efa..dbab548 100644
--- a/cmds/incidentd/src/Privacy.cpp
+++ b/cmds/incidentd/src/Privacy.cpp
@@ -88,6 +88,12 @@
 }
 
 bool
+PrivacySpec::operator<(const PrivacySpec& other) const
+{
+  return dest < other.dest;
+}
+
+bool
 PrivacySpec::CheckPremission(const Privacy* privacy) const
 {
     uint8_t policy = privacy == NULL ? DEST_DEFAULT_VALUE : privacy->dest;
@@ -97,4 +103,9 @@
 bool
 PrivacySpec::RequireAll() const { return dest == DEST_LOCAL; }
 
+PrivacySpec new_spec_from_args(int dest) {
+  if (dest < 0) return PrivacySpec();
+  return PrivacySpec(dest);
+}
+
 PrivacySpec get_default_dropbox_spec() { return PrivacySpec(DEST_AUTOMATIC); }
\ No newline at end of file