The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [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; |
| 23 | string depFileName; |
| 24 | |
| 25 | vector<string> filesToPreprocess; |
| 26 | }; |
| 27 | |
| 28 | // takes the inputs from the command line and fills in the Options struct |
| 29 | // Returns 0 on success, and nonzero on failure. |
| 30 | // It also prints the usage statement on failure. |
| 31 | int parse_options(int argc, const char* const* argv, Options *options); |
| 32 | |
| 33 | #endif // DEVICE_TOOLS_AIDL_H |