1syntax = "proto2"; 2 3package android.stats.mobiledatadownload; 4 5option java_multiple_files = true; 6 7enum DownloadStatus { 8 UNKNOWN = 0; 9 PENDING = 1; 10 FAILED = 2; 11 DOWNLOADED = 3; 12} 13 14enum DownloadResult { 15 UNSPECIFIED = 0; // unset value 16 17 // File downloaded successfully. 18 SUCCESS = 1; 19 20 // The error we don't know. 21 UNKNOWN_ERROR = 2; 22 23 // The errors from the android downloader v1 outside MDD 24 // The block 100-199 (included) is reserved for android downloader v1. 25 // Next tag: 112 26 ANDROID_DOWNLOADER_UNKNOWN = 100; 27 ANDROID_DOWNLOADER_CANCELED = 101; 28 ANDROID_DOWNLOADER_INVALID_REQUEST = 102; 29 ANDROID_DOWNLOADER_HTTP_ERROR = 103; 30 ANDROID_DOWNLOADER_REQUEST_ERROR = 104; 31 ANDROID_DOWNLOADER_RESPONSE_OPEN_ERROR = 105; 32 ANDROID_DOWNLOADER_RESPONSE_CLOSE_ERROR = 106; 33 ANDROID_DOWNLOADER_NETWORK_IO_ERROR = 107; 34 ANDROID_DOWNLOADER_DISK_IO_ERROR = 108; 35 ANDROID_DOWNLOADER_FILE_SYSTEM_ERROR = 109; 36 ANDROID_DOWNLOADER_UNKNOWN_IO_ERROR = 110; 37 ANDROID_DOWNLOADER_OAUTH_ERROR = 111; 38 39 // The errors from the android downloader v2 outside MDD 40 // The block 200-299 (included) is reserved for android downloader v2. 41 // Next tag: 201 42 ANDROID_DOWNLOADER2_ERROR = 200; 43 44 // The data file group has not been added to MDD by the time the caller 45 // makes download API call. 46 GROUP_NOT_FOUND_ERROR = 300; 47 48 // The DownloadListener is present but the DownloadMonitor is not provided. 49 DOWNLOAD_MONITOR_NOT_PROVIDED_ERROR = 301; 50 51 // Errors from unsatisfied download preconditions. 52 INSECURE_URL_ERROR = 302; 53 LOW_DISK_ERROR = 303; 54 55 // Errors from download preparation. 56 UNABLE_TO_CREATE_FILE_URI_ERROR = 304; 57 SHARED_FILE_NOT_FOUND_ERROR = 305; 58 MALFORMED_FILE_URI_ERROR = 306; 59 UNABLE_TO_CREATE_MOBSTORE_RESPONSE_WRITER_ERROR = 307; 60 61 // Errors from file validation. 62 UNABLE_TO_VALIDATE_DOWNLOAD_FILE_ERROR = 308; 63 DOWNLOADED_FILE_NOT_FOUND_ERROR = 309; 64 DOWNLOADED_FILE_CHECKSUM_MISMATCH_ERROR = 310; 65 CUSTOM_FILEGROUP_VALIDATION_FAILED = 330; 66 67 // Errors from download transforms. 68 UNABLE_TO_SERIALIZE_DOWNLOAD_TRANSFORM_ERROR = 311; 69 DOWNLOAD_TRANSFORM_IO_ERROR = 312; 70 FINAL_FILE_CHECKSUM_MISMATCH_ERROR = 313; 71 72 // Errors from delta download. 73 DELTA_DOWNLOAD_BASE_FILE_NOT_FOUND_ERROR = 314; 74 DELTA_DOWNLOAD_DECODE_IO_ERROR = 315; 75 76 // The error occurs after the file is ready. 77 UNABLE_TO_UPDATE_FILE_STATE_ERROR = 316; 78 79 // Fail to update the file group metadata. 80 UNABLE_TO_UPDATE_GROUP_METADATA_ERROR = 317; 81 82 // Errors from sharing files with the blob storage. 83 // Failed to update the metadata max_expiration_date. 84 UNABLE_TO_UPDATE_FILE_MAX_EXPIRATION_DATE = 318; 85 UNABLE_SHARE_FILE_BEFORE_DOWNLOAD_ERROR = 319; 86 UNABLE_SHARE_FILE_AFTER_DOWNLOAD_ERROR = 320; 87 88 // Download errors related to isolated file structure 89 UNABLE_TO_REMOVE_SYMLINK_STRUCTURE = 321; 90 UNABLE_TO_CREATE_SYMLINK_STRUCTURE = 322; 91 92 // Download errors related to importing inline files 93 UNABLE_TO_RESERVE_FILE_ENTRY = 323; 94 INVALID_INLINE_FILE_URL_SCHEME = 324; 95 INLINE_FILE_IO_ERROR = 327; 96 MISSING_INLINE_DOWNLOAD_PARAMS = 328; 97 MISSING_INLINE_FILE_SOURCE = 329; 98 99 // Download errors related to URL parsing 100 MALFORMED_DOWNLOAD_URL = 325; 101 UNSUPPORTED_DOWNLOAD_URL_SCHEME = 326; 102 103 // Download errors for manifest file group populator. 104 MANIFEST_FILE_GROUP_POPULATOR_INVALID_FLAG_ERROR = 400; 105 MANIFEST_FILE_GROUP_POPULATOR_CONTENT_CHANGED_DURING_DOWNLOAD_ERROR = 401; 106 MANIFEST_FILE_GROUP_POPULATOR_PARSE_MANIFEST_FILE_ERROR = 402; 107 MANIFEST_FILE_GROUP_POPULATOR_DELETE_MANIFEST_FILE_ERROR = 403; 108 MANIFEST_FILE_GROUP_POPULATOR_METADATA_IO_ERROR = 404; 109}