The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | #ifndef DEVICE_TOOLS_AIDL_H |
| 2 | #define DEVICE_TOOLS_AIDL_H |
| 3 | |
| 4 | #include <string> |
| 5 | #include <vector> |
| 6 | |
| 7 | using namespace std; |
| 8 | |
| 9 | enum { |
| 10 | COMPILE_AIDL, |
| 11 | PREPROCESS_AIDL |
| 12 | }; |
| 13 | |
| 14 | // This struct is the parsed version of the command line options |
| 15 | struct Options |
| 16 | { |
| 17 | int task; |
| 18 | bool failOnParcelable; |
| 19 | vector<string> importPaths; |
| 20 | vector<string> preprocessedFiles; |
| 21 | string inputFileName; |
| 22 | string outputFileName; |
The Android Open Source Project | ba87e3e | 2009-03-13 13:04:22 -0700 | [diff] [blame] | 23 | string outputBaseFolder; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 24 | string depFileName; |
| 25 | |
| 26 | vector<string> filesToPreprocess; |
| 27 | }; |
| 28 | |
| 29 | // takes the inputs from the command line and fills in the Options struct |
| 30 | // Returns 0 on success, and nonzero on failure. |
| 31 | // It also prints the usage statement on failure. |
| 32 | int parse_options(int argc, const char* const* argv, Options *options); |
| 33 | |
| 34 | #endif // DEVICE_TOOLS_AIDL_H |