/* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ syntax = "proto2"; package android.adservices; // Recommended setup in go/java-proto-names option java_outer_classname = "AdservicesProtoEnums"; option java_multiple_files = true; /** * Type of the classifier used for classifying apps. */ enum ClassifierType { /** Unknown classifier option. */ UNKNOWN_CLASSIFIER = 0; /** Only on-device classification. */ ON_DEVICE_CLASSIFIER = 1; /** Only Precomputed classification. */ PRECOMPUTED_CLASSIFIER = 2; /** Precomputed classification values are preferred over on-device classification values. */ PRECOMPUTED_THEN_ON_DEVICE_CLASSIFIER = 3; } /** * On Device classifier status. */ enum OnDeviceClassifierStatus { ON_DEVICE_CLASSIFIER_STATUS_UNSPECIFIED = 0; ON_DEVICE_CLASSIFIER_STATUS_NOT_INVOKED = 1; ON_DEVICE_CLASSIFIER_STATUS_SUCCESS = 2; ON_DEVICE_CLASSIFIER_STATUS_FAILURE = 3; } /** * Precomputed classifier status. */ enum PrecomputedClassifierStatus { PRECOMPUTED_CLASSIFIER_STATUS_UNSPECIFIED = 0; PRECOMPUTED_CLASSIFIER_STATUS_NOT_INVOKED = 1; PRECOMPUTED_CLASSIFIER_STATUS_SUCCESS = 2; PRECOMPUTED_CLASSIFIER_STATUS_FAILURE = 3; } /** * Attribution types. */ enum AttributionType { UNKNOWN = 0; APP_APP = 1; APP_WEB = 2; WEB_APP = 3; WEB_WEB = 4; } /** * Enum representing an error/exception. These errors can be common to all * PPAPIs or specific to a particular API. We will group enums in blocks of * 1000 like this below: * - Common errors: 1-1000 * - Topics errors: 1001-2000 * - Measurement errors: 2001-3000 * - Fledge errors: 3001-4000 * - UX errors: 4001-5000 * - FederatedCompute errors: 5001-6000 * - Back Compat errors: 6001-7000 * - IAPC errors: 7001 - 8000 * - ODP errors: 8001-9000 * * NOTE: AdId / AdSetId don't have a range yet (because they're just using common codes) */ enum ErrorCode { // Common Errors: 1-1000 ERROR_CODE_UNSPECIFIED = 0; DATABASE_READ_EXCEPTION = 1; DATABASE_WRITE_EXCEPTION = 2; API_REMOTE_EXCEPTION = 3; // Error occurred when unable to send result to the callback. API_CALLBACK_ERROR = 4; // Error occurred when failed to call the callback on Rate Limit Reached. RATE_LIMIT_CALLBACK_FAILURE = 5; // Error occurred when calling package name is not found. PACKAGE_NAME_NOT_FOUND_EXCEPTION = 6; // Shared pref update failure. SHARED_PREF_UPDATE_FAILURE = 7; // Shared pref reset failure. SHARED_PREF_RESET_FAILURE = 8; // Remote exception when calling the Cobalt upload API. COBALT_UPLOAD_API_REMOTE_EXCEPTION = 9; // Exception occurred when parsing the Adservices Config XML provided by an app. APP_MANIFEST_CONFIG_PARSING_ERROR = 10; // Generic exception when dealing with shared prefs. SHARED_PREF_EXCEPTION = 11; // Error logging an API check using Adservices Config XML provided by an app. APP_MANIFEST_CONFIG_LOGGING_ERROR = 12; // Incorrect version of the json file. ENCRYPTION_KEYS_INCORRECT_JSON_VERSION = 13; // JSON parsing error for the key. ENCRYPTION_KEYS_JSON_PARSING_ERROR = 14; // Failed to delete an expired encryption key. ENCRYPTION_KEYS_FAILED_DELETE_EXPIRED_KEY = 15; // Failed to load Encryption Keys MDD filegroup ENCRYPTION_KEYS_FAILED_MDD_FILEGROUP = 16; // Encryption Keys no MDD files available. ENCRYPTION_KEYS_MDD_NO_FILE_AVAILABLE = 17; // JobScheduler is not available. JOB_SCHEDULER_IS_UNAVAILABLE = 18; // Failed to encrypt data in Cobalt. COBALT_ENCRYPTION_FAILED_EXCEPTION = 19; // Failed to fabricate Cobalt observations. COBALT_PRIVACY_GENERATION_EXCEPTION = 20; // Cobalt logger initialization failed in AppNameApiErrorLogger. COBALT_API_ERROR_LOGGER_INITIALIZATION_EXCEPTION = 21; // SPE Errors: 901 - 1000 // Get an unavailable job execution start timestamp when calculating the execution latency. SPE_UNAVAILABLE_JOB_EXECUTION_START_TIMESTAMP = 901; // Get an invalid execution period during the calculation. SPE_INVALID_EXECUTION_PERIOD = 902; // Failed to persist execution start time in the storage. SPE_FAIL_TO_COMMIT_JOB_EXECUTION_START_TIME = 903; // Failed to persist execution stop time in the storage. SPE_FAIL_TO_COMMIT_JOB_EXECUTION_STOP_TIME = 904; // Execution failure. SPE_JOB_EXECUTION_FAILURE = 905; // JobScheduler is not available. SPE_JOB_SCHEDULER_IS_UNAVAILABLE = 906; // Invalid Job Policy configured in the server. SPE_INVALID_JOB_POLICY_SYNC = 907; // Job is not configured correctly. SPE_JOB_NOT_CONFIGURED_CORRECTLY = 908; // Scheduling Failure. SPE_JOB_SCHEDULING_FAILURE = 909; // Failure of the customized logic in onStopJob(). SPE_JOB_ON_STOP_EXECUTION_FAILURE = 910; // Topics errors: 1001-2000 // Remote exception when calling get topics. GET_TOPICS_REMOTE_EXCEPTION = 1001; // Topics API is disabled. TOPICS_API_DISABLED = 1002; // SQLException occurred when failed to persist classified Topics. TOPICS_PERSIST_CLASSIFIED_TOPICS_FAILURE = 1003; // SQLException occurred when failed to persist Top Topics. TOPICS_PERSIST_TOP_TOPICS_FAILURE = 1004; // SQLException occurred when failed to record App-Sdk usage history. TOPICS_RECORD_APP_SDK_USAGE_FAILURE = 1005; // SQLException occurred when failed to record App Only usage history. TOPICS_RECORD_APP_USAGE_FAILURE = 1006; // SQLException occurred when failed to record can learn topic. TOPICS_RECORD_CAN_LEARN_TOPICS_FAILURE = 1007; // SQLException occurred when failed to record returned topic. TOPICS_RECORD_RETURNED_TOPICS_FAILURE = 1008; // SQLException occurred when failed to record returned topic. TOPICS_RECORD_BLOCKED_TOPICS_FAILURE = 1009; // SQLException occurred when failed to remove blocked topic. TOPICS_DELETE_BLOCKED_TOPICS_FAILURE = 1010; // SQLException occurred when failed to delete old epochs. TOPICS_DELETE_OLD_EPOCH_FAILURE = 1011; // SQLException occurred when failed to delete a column in table TOPICS_DELETE_COLUMN_FAILURE = 1012; // SQLException occurred when failed to persist topic contributors. TOPICS_PERSIST_TOPICS_CONTRIBUTORS_FAILURE = 1013; // SQLException occurred when failed to delete all entries from table. TOPICS_DELETE_ALL_ENTRIES_IN_TABLE_FAILURE = 1014; // Exception occurred when classify call failed. TOPICS_ON_DEVICE_CLASSIFY_FAILURE = 1015; // Exception occurred ML model did not return a topic id. TOPICS_ON_DEVICE_NUMBER_FORMAT_EXCEPTION = 1016; // Exception occurred when failed to load ML model. TOPICS_LOAD_ML_MODEL_FAILURE = 1017; // Exception occurred when unable to retrieve topics id to topics name. TOPICS_ID_TO_NAME_LIST_READ_FAILURE = 1018; // Exception occurred when unable to read classifier asset file. TOPICS_READ_CLASSIFIER_ASSET_FILE_FAILURE = 1019; // NoSuchAlgorithmException occurred when unable to find correct message. // digest algorithm. TOPICS_MESSAGE_DIGEST_ALGORITHM_NOT_FOUND = 1020; // Error occurred when failed to find downloaded classifier model file. DOWNLOADED_CLASSIFIER_MODEL_FILE_NOT_FOUND = 1021; // No downloaded or bundled classifier model available. NO_CLASSIFIER_MODEL_AVAILABLE = 1022; // Error occurred when failed to read labels file. READ_LABELS_FILE_FAILURE = 1023; // Error occurred when failed to read precomuted labels. READ_PRECOMUTRED_LABELS_FAILURE = 1024; // Error occurred when failed to read top apps file. READ_TOP_APPS_FILE_FAILURE = 1025; // Error occurred when saving a topic not in labels file. INVALID_TOPIC_ID = 1026; // Error occurred when failed to read precomuted app topics list. READ_PRECOMUTRED_APP_TOPICS_LIST_FAILURE = 1027; // Error occurred when failed to read bundled metadata file. READ_BUNDLED_METADATA_FILE_FAILURE = 1028; // Error occurred when reading redundant metadata property. CLASSIFIER_METADATA_REDUNDANT_PROPERTY = 1029; // Error occurred when reading redundant metadata asset. CLASSIFIER_METADATA_REDUNDANT_ASSET = 1030; // Error occurred when parsing metadata json missing property or asset_name. CLASSIFIER_METADATA_MISSING_PROPERTY_OR_ASSET_NAME = 1031; // Error occurred when failed to read classifier assets metadata file. READ_CLASSIFIER_ASSETS_METADATA_FAILURE = 1032; // Error occurred when failed to load downloaded file by file Id. DOWNLOADED_CLASSIFIER_MODEL_FILE_LOAD_FAILURE = 1033; // RuntimeException occurred when use invalid type of blocked topics // source of truth. TOPICS_INVALID_BLOCKED_TOPICS_SOURCE_OF_TRUTH = 1034; // RuntimeException occurred when unable to remove the blocked topic. TOPICS_REMOVE_BLOCKED_TOPIC_FAILURE = 1035; // RuntimeException occurred when unable to get all blocked topics. TOPICS_GET_BLOCKED_TOPIC_FAILURE = 1036; // RuntimeException occurred when unable to clear all blocked topics // in system server. TOPICS_CLEAR_ALL_BLOCKED_TOPICS_IN_SYSTEM_SERVER_FAILURE = 1037; // Error occurred when unable to handle JobService. TOPICS_HANDLE_JOB_SERVICE_FAILURE = 1038; // Error occurred when unable to fetch job scheduler. TOPICS_FETCH_JOB_SCHEDULER_FAILURE = 1039; // Error occurred while deleting a table for Topics. TOPICS_DELETE_TABLE_FAILURE = 1040; // Cobalt initialisation failure for Topics. TOPICS_COBALT_LOGGER_INITIALIZATION_FAILURE = 1041; // Failure to convert plaintext topic object to encrypted topic. TOPICS_ENCRYPTION_FAILURE = 1042; // Topics encryption key with invalid length. TOPICS_ENCRYPTION_INVALID_KEY_LENGTH = 1043; // Topics encryption with invalid response length. TOPICS_ENCRYPTION_INVALID_RESPONSE_LENGTH = 1044; // Topics encryption key failed to decode with Base64 decoder. TOPICS_ENCRYPTION_KEY_DECODE_FAILURE = 1045; // Topics encryption received null params in request for the encrypter. TOPICS_ENCRYPTION_NULL_REQUEST = 1046; // Topics encryption received null response from the encrypter. TOPICS_ENCRYPTION_NULL_RESPONSE = 1047; // Topics encryption received error while serialization to JSON. TOPICS_ENCRYPTION_SERIALIZATION_ERROR = 1048; // Topics encryption public key is missing. TOPICS_ENCRYPTION_KEY_MISSING = 1049; // Topics API request has empty sdk name. TOPICS_REQUEST_EMPTY_SDK_NAME = 1050; // Measurement errors: 2001-3000 // Error occurred when inserting enrollment data to DB. ENROLLMENT_DATA_INSERT_ERROR = 2001; // Error occurred when deleting enrollment data to DB. ENROLLMENT_DATA_DELETE_ERROR = 2002; // Measurement foreground unknown failure. MEASUREMENT_FOREGROUND_UNKNOWN_FAILURE = 2003; // Measurement datastore failure. MEASUREMENT_DATASTORE_FAILURE = 2004; // Measurement datastore unknown failure. MEASUREMENT_DATASTORE_UNKNOWN_FAILURE = 2005; // Measurement invalid parameter fetching public keys. MEASUREMENT_PUBLIC_KEY_FETCHER_INVALID_PARAMETER = 2006; // Measurement IO exception while fetching public keys. MEASUREMENT_PUBLIC_KEY_FETCHER_IO_ERROR = 2007; // Measurement error while parsing public keys. MEASUREMENT_PUBLIC_KEY_FETCHER_PARSING_ERROR = 2008; // Failure to save seed in SharedPreferences ENROLLMENT_SHARED_PREFERENCES_SEED_SAVE_FAILURE = 2009; // When report deliver fails due to a network issue (IOException). MEASUREMENT_REPORTING_NETWORK_ERROR = 2010; // When report delivery fails due to report building as JSON. MEASUREMENT_REPORTING_PARSING_ERROR = 2011; // When encryption of aggregate report fails. MEASUREMENT_REPORTING_ENCRYPTION_ERROR = 2012; // Reporting errors should have specific error codes. MEASUREMENT_REPORTING_UNKNOWN_ERROR = 2013; // When parsing of enrollment file fails. ENROLLMENT_FAILED_PARSING = 2014; // Error occurred when encountering invalid enrollment. ENROLLMENT_INVALID = 2015; // Error occurred when trying to get instance of an ODP system event manager MEASUREMENT_REGISTRATION_ODP_GET_MANAGER_ERROR = 2016; // Error due to the ODP header being in an invalid format MEASUREMENT_REGISTRATION_ODP_INVALID_HEADER_FORMAT_ERROR = 2017; // Error due to the ODP header missing a required field MEASUREMENT_REGISTRATION_ODP_MISSING_REQUIRED_HEADER_FIELD_ERROR = 2018; // Error due to the ODP header containing a field with an invalid value MEASUREMENT_REGISTRATION_ODP_INVALID_HEADER_FIELD_VALUE_ERROR = 2019; // Error occurred when trying to parse the ODP header (JSON Exception) MEASUREMENT_REGISTRATION_ODP_JSON_PARSING_ERROR = 2020; // Error occurred when trying to parse the ODP header (Unknown Exception) MEASUREMENT_REGISTRATION_ODP_PARSING_UNKNOWN_ERROR = 2021; // Error occurred when trying to initialize cobalt logger for measurement metrics. MEASUREMENT_COBALT_LOGGER_INITIALIZATION_FAILURE = 2022; // UX errors: 4001-5000 CONSENT_REVOKED_ERROR = 4001; // Error occurred when failed to get downloaded OTA file URI. DOWNLOADED_OTA_FILE_ERROR = 4002; // Exception while trying to add ResourcesProvider. RESOURCES_PROVIDER_ADD_ERROR = 4003; // Exception occurred when unable to load MDD file group LOAD_MDD_FILE_GROUP_FAILURE = 4004; // Dismiss notification error DISMISS_NOTIFICATION_FAILURE = 4005; // Datastore exception while get content DATASTORE_EXCEPTION_WHILE_GET_CONTENT = 4006; // Datastore exception while recording notification DATASTORE_EXCEPTION_WHILE_RECORDING_NOTIFICATION = 4007; // Datastore exception while recording default consent. DATASTORE_EXCEPTION_WHILE_RECORDING_DEFAULT_CONSENT = 4008; // Exception while recording manual consent interaction DATASTORE_EXCEPTION_WHILE_RECORDING_MANUAL_CONSENT_INTERACTION = 4009; // Exception while saving privacy sandbox feature. PRIVACY_SANDBOX_SAVE_FAILURE = 4010; // Error message indicating invalid consent source of truth. INVALID_CONSENT_SOURCE_OF_TRUTH = 4011; // Error message while calling get consent. ERROR_WHILE_GET_CONSENT = 4012; // App search consent data migration failure. APP_SEARCH_DATA_MIGRATION_FAILURE = 4013; // Adservices entry point failure. AD_SERVICES_ENTRY_POINT_FAILURE = 4014; // Used to be MEASUREMENT_FOREGROUND_UNKNOWN_FAILURE but renamed in // commit 94af8756d2f03ff17924721ee1b7c4a4520377ff RESERVED_ERROR_CODE_4015 = 4015; // FederatedCompute errors: 5001-6000 // Datastore exception while deleting a federated task. DELETE_TASK_FAILURE = 5001; // Exception while trying to close file descriptor. FILE_DESCRIPTOR_CLOSE_ERROR = 5002; // Error message indicating invalid federated job plan type. CLIENT_PLAN_SPEC_ERROR = 5003; // Exception when trying to parse protobuf message. INVALID_PROTOBUF_ERROR = 5004; // Exception occurred when isolated training process runs. ISOLATED_TRAINING_PROCESS_ERROR = 5005; // Exception while trying to iterate data. ITERATOR_NEXT_FAILURE = 5006; // Timeout exception while trying to iterate data. ITERATOR__NEXT_TIMEOUT = 5007; // Back Compat errors: 6001-7000 // AdExtDataService get failed GET_ADEXT_DATA_SERVICE_ERROR = 6001; // AdExtDataService put failed PUT_ADEXT_DATA_SERVICE_ERROR = 6002; // Failed to cancel background jobs in back compat init. BACK_COMPAT_INIT_CANCEL_JOB_FAILURE = 6003; // Failed to update UI activity enabled setting in back compat init. BACK_COMPAT_INIT_UPDATE_ACTIVITY_FAILURE = 6004; // Failed to update service enabled setting in back compat init. BACK_COMPAT_INIT_UPDATE_SERVICE_FAILURE = 6005; // Failed to enable package changed receiver in back compat init. BACK_COMPAT_INIT_ENABLE_RECEIVER_FAILURE = 6006; // Failed to disable package changed receiver in back compat init. BACK_COMPAT_INIT_DISABLE_RECEIVER_FAILURE = 6007; // Failed to run back compat init in boot completed receiver. BACK_COMPAT_INIT_BOOT_COMPLETED_RECEIVER_FAILURE = 6008; // IAPC errors: 7001-8000 // AdIdProviderService is not available. IAPC_AD_ID_PROVIDER_NOT_AVAILABLE = 7001; // Exception when calling UpdateAdId API in service side. IAPC_UPDATE_AD_ID_API_ERROR = 7002; // ODP errors: 8001-9000 // ODP generic error ON_DEVICE_PERSONALIZATION_ERROR = 8001; // ODP execute Isolated service error ISOLATED_SERVICE_EXECUTE_ERROR = 8002; // ODP download Isolated service error ISOLATED_SERVICE_DOWNLOAD_ERROR = 8003; // ODP render Isolated service error ISOLATED_SERVICE_RENDER_ERROR = 8004; // ODP web view event Isolated service error ISOLATED_SERVICE_EVENT_ERROR = 8005; // ODP training example Isolated service error ISOLATED_SERVICE_TRAINING_EXAMPLE_ERROR = 8006; // ODP web trigger Isolated service error ISOLATED_SERVICE_WEB_TRIGGER_ERROR = 8007; } /** * Adservices API names. */ enum PpapiName { PPAPI_NAME_UNSPECIFIED = 0; TOPICS = 1; MEASUREMENT = 2; FLEDGE = 3; AD_ID = 4; APP_SET_ID = 5; UX = 6; // Use COMMON enum when the error happens in the common code path. COMMON = 7; // Represents federatedcompute APK in OnDevicePersonalization module. FEDERATED_COMPUTE = 8; // Data service used for migrating consent from Android R ADEXT_DATA_SERVICE = 9; // Represents ondevicepersonalization APK of OnDevicePersonalization module. ODP = 10; } /** * Type of the result code that implies different execution results of Adservices background jobs. */ enum ExecutionResultCode { /** Unspecified result code. */ UNSPECIFIED_CODE = 0; /** Successful execution. */ SUCCESSFUL = 1; /** Failed execution with retrying the job. */ FAILED_WITH_RETRY = 2; /** Failed execution without retrying the job. */ FAILED_WITHOUT_RETRY = 3; /** OnJobStop() is invoked with retrying the job. */ ONSTOP_CALLED_WITH_RETRY = 4; /** OnJobStop() is invoked without retrying the job. */ ONSTOP_CALLED_WITHOUT_RETRY = 5; /** * The execution is halted by system or device for unknown reason, leaving * a not finished execution. */ HALTED_FOR_UNKNOWN_REASON = 6; /** Skipped execution due to a job scheduled in ExtServices running on T+. */ SKIP_FOR_EXTSERVICES_JOB_ON_TPLUS = 7; /** Skipped execution due to kill switch is on. */ SKIP_FOR_KILL_SWITCH_ON = 8; /** Skipped execution due to user consent is revoked. */ SKIP_FOR_USER_CONSENT_REVOKED = 9; /** Skipped execution due to job is not configured. */ SKIP_FOR_JOB_NOT_CONFIGURED = 10; /** Skipped execution due to personalization not enabled. */ SKIP_FOR_PERSONALIZATION_NOT_ENABLED = 11; } /** Type of the result code that implies different scheduling results. */ enum JobSchedulingResultCode { // Default value. SCHEDULING_RESULT_CODE_UNSPECIFIED = 0; // Indicates the scheduling is successful. SCHEDULING_RESULT_CODE_SUCCESSFUL = 1; // Indicates the scheduling is failed. SCHEDULING_RESULT_CODE_FAILED = 2; // Indicates the scheduling is skipped due to same policy. SCHEDULING_RESULT_CODE_SKIPPED = 3; } /** Type of scheduler used for the job scheduling. */ enum SchedulerType { // Default value. SCHEDULER_TYPE_UNSPECIFIED = 0; // Indicates the scheduler is Platform JobScheduler. SCHEDULER_TYPE_JOB_SCHEDULER = 1; // Indicates the scheduler is Platform SPE (Scheduling Policy Engine). SCHEDULER_TYPE_SPE = 2; } // Region of the user who interacted with AdServicesSettings UI. enum AdServiceSettingRegion { // fallback when getDeviceRegion call failed. REGION_UNSPECIFIED = 0; // European Union user (based on isoCountryInfo). EU = 1; // Non-European Union user (based on isoCountryInfo). ROW = 2; } /* APIs whose access can be overridden by the app developer through the Android manifest. */ enum AppApiAccessType { API_ACCESS_TYPE_UNSPECIFIED = 0; API_ACCESS_TYPE_TOPICS = 1; API_ACCESS_TYPE_CUSTOM_AUDIENCES = 2; API_ACCESS_TYPE_ATTRIBUTION = 3; API_ACCESS_TYPE_PROTECTED_SIGNALS = 4; API_ACCESS_TYPE_AD_SELECTION = 5; } /* Result of a call to check if an app allows access to a given AdServices API. */ enum AppApiAccessResult { API_ACCESS_RESULT_UNSPECIFIED = 0; API_ACCESS_RESULT_ALLOWED_BY_DEFAULT_APP_DOES_NOT_HAVE_CONFIG = 1; API_ACCESS_RESULT_ALLOWED_BY_DEFAULT_APP_HAS_CONFIG_WITHOUT_API_SECTION = 2; API_ACCESS_RESULT_ALLOWED_APP_ALLOWS_ALL = 3; API_ACCESS_RESULT_ALLOWED_APP_ALLOWS_SPECIFIC_ID = 4; API_ACCESS_RESULT_DISALLOWED_APP_DOES_NOT_EXIST = 5; API_ACCESS_RESULT_DISALLOWED_APP_CONFIG_PARSING_ERROR = 6; API_ACCESS_RESULT_DISALLOWED_APP_DOES_NOT_HAVE_CONFIG = 7; API_ACCESS_RESULT_DISALLOWED_APP_DOES_HAS_CONFIG_WITHOUT_API_SECTION = 8; API_ACCESS_RESULT_DISALLOWED_BY_APP = 9; API_ACCESS_RESULT_DISALLOWED_GENERIC_ERROR = 10; } // Module for which the job is reported. enum ModuleName { UNKNOWN_MODULE_NAME = 0; MODULE_NAME_ADSERVICES = 1; MODULE_NAME_ON_DEVICE_PERSONALIZATION = 2; MODULE_NAME_FEDERATED_COMPUTE = 3; } /** * Enum representing a shell command. We will group enums in blocks of * 100 like this below: * - Common commands: 1-100 * - Custom audience commands: 101-200 * - Ad Selection commands: 201-300 * */ enum Command { COMMAND_UNSET = 0; // Common commands: 1-100 COMMAND_ECHO = 1; COMMAND_IS_ALLOWED_ATTRIBUTION_ACCESS = 2; COMMAND_IS_ALLOWED_PROTECTED_SIGNALS_ACCESS = 3; COMMAND_IS_ALLOWED_CUSTOM_AUDIENCE_ACCESS = 4; COMMAND_IS_ALLOWED_AD_SELECTION_ACCESS = 5; COMMAND_IS_ALLOWED_TOPICS_ACCESS = 6; // Custom audience commands: 101-200 COMMAND_CUSTOM_AUDIENCE_VIEW = 101; COMMAND_CUSTOM_AUDIENCE_LIST = 102; COMMAND_CUSTOM_AUDIENCE_REFRESH = 103; // Ad Selection commands: 201-300 COMMAND_AD_SELECTION_CONSENTED_DEBUG_ENABLE = 201; COMMAND_AD_SELECTION_CONSENTED_DEBUG_DISABLE = 202; COMMAND_AD_SELECTION_CONSENTED_DEBUG_VIEW = 203; COMMAND_AD_SELECTION_CONSENTED_DEBUG_HELP = 204; COMMAND_AD_SELECTION_GET_AD_SELECTION_DATA = 205; COMMAND_AD_SELECTION_MOCK_AUCTION = 206; // Protected App Signals commands: 301-400 reserved 301; COMMAND_APP_SIGNALS_GENERATE_INPUT_FOR_ENCODING = 302; } // Result of the shell command enum CommandResult { COMMAND_RESULT_UNKNOWN = 0; COMMAND_RESULT_SUCCESS = 1; COMMAND_RESULT_GENERIC_ERROR = 2; COMMAND_RESULT_INVALID_ARGS = 3; COMMAND_RESULT_TIMEOUT_ERROR = 4; COMMAND_RESULT_INVALID_COMMAND = 5; COMMAND_RESULT_NOT_ENABLED = 6; }