The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame^] | 1 | #ifndef _ASEC_H |
| 2 | #define _ASEC_H |
| 3 | |
| 4 | #define ASEC_STORES_MAX 4 |
| 5 | #define MAX_LOOP 8 |
| 6 | |
| 7 | typedef enum AsecState { |
| 8 | // Feature disabled |
| 9 | ASEC_DISABLED, |
| 10 | |
| 11 | // Feature enabled and operational |
| 12 | ASEC_AVAILABLE, |
| 13 | |
| 14 | // Busy |
| 15 | ASEC_BUSY, |
| 16 | |
| 17 | // Internal Error |
| 18 | ASEC_FAILED_INTERR, |
| 19 | |
| 20 | // No media available |
| 21 | ASEC_FAILED_NOMEDIA, |
| 22 | |
| 23 | // Media is corrupt |
| 24 | ASEC_FAILED_BADMEDIA, |
| 25 | |
| 26 | // Key mismatch |
| 27 | ASEC_FAILED_BADKEY, |
| 28 | } AsecState; |
| 29 | |
| 30 | /* |
| 31 | * ASEC commands |
| 32 | */ |
| 33 | #define ASEC_CMD_SEND_STATUS "asec_send_status" |
| 34 | #define ASEC_CMD_ENABLE "asec_enable" |
| 35 | #define ASEC_CMD_DISABLE "asec_disable" |
| 36 | |
| 37 | /* |
| 38 | * ASEC events |
| 39 | */ |
| 40 | |
| 41 | // These events correspond to the states in the AsecState enum. |
| 42 | // A path to the ASEC mount point follows the colon |
| 43 | #define ASEC_EVENT_DISABLED "asec_disabled:" |
| 44 | #define ASEC_EVENT_AVAILABLE "asec_available:" |
| 45 | #define ASEC_EVENT_BUSY "asec_busy:" |
| 46 | #define ASEC_EVENT_FAILED_INTERR "asec_failed_interror:" |
| 47 | #define ASEC_EVENT_FAILED_NOMEDIA "asec_failed_nomedia" |
| 48 | #define ASEC_EVENT_FAILED_BADMEDIA "asec_failed_badmedia:" |
| 49 | #define ASEC_EVENT_FAILED_BADKEY "asec_failed_badkey:" |
| 50 | |
| 51 | /* |
| 52 | * System Properties |
| 53 | */ |
| 54 | |
| 55 | #define ASEC_ENABLED "asec.enabled" |
| 56 | |
| 57 | #define ASEC_STATUS "ro.asec.status" |
| 58 | #define ASEC_STATUS_DISABLED "disabled" |
| 59 | #define ASEC_STATUS_AVAILABLE "available" |
| 60 | #define ASEC_STATUS_BUSY "busy" |
| 61 | #define ASEC_STATUS_FAILED_INTERR "internal_error" |
| 62 | #define ASEC_STATUS_FAILED_NOMEDIA "no_media" |
| 63 | #define ASEC_STATUS_FAILED_BADMEDIA "bad_media" |
| 64 | #define ASEC_STATUS_FAILED_BADKEY "bad_key" |
| 65 | |
| 66 | #endif |