The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | // |
| 2 | // Copyright 2006 The Android Open Source Project |
| 3 | // |
| 4 | // Some global defines that don't really merit their own header. |
| 5 | // |
| 6 | #ifndef __MAIN_H |
| 7 | #define __MAIN_H |
| 8 | |
Mathias Agopian | 3b4062e | 2009-05-31 19:13:00 -0700 | [diff] [blame] | 9 | #include <utils/Log.h> |
| 10 | #include <utils/threads.h> |
| 11 | #include <utils/List.h> |
| 12 | #include <utils/Errors.h> |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 13 | #include "Bundle.h" |
| 14 | #include "AaptAssets.h" |
Mathias Agopian | 55e3d60 | 2009-06-05 14:56:35 -0700 | [diff] [blame] | 15 | #include "ZipFile.h" |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 16 | |
Josiah Gaskin | 8a39da8 | 2011-06-06 17:00:35 -0700 | [diff] [blame] | 17 | |
| 18 | /* Benchmarking Flag */ |
| 19 | //#define BENCHMARK 1 |
| 20 | |
| 21 | #if BENCHMARK |
| 22 | #include <time.h> |
| 23 | #endif /* BENCHMARK */ |
| 24 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 25 | extern int doVersion(Bundle* bundle); |
| 26 | extern int doList(Bundle* bundle); |
| 27 | extern int doDump(Bundle* bundle); |
| 28 | extern int doAdd(Bundle* bundle); |
| 29 | extern int doRemove(Bundle* bundle); |
| 30 | extern int doPackage(Bundle* bundle); |
Josiah Gaskin | 8a39da8 | 2011-06-06 17:00:35 -0700 | [diff] [blame] | 31 | extern int doCrunch(Bundle* bundle); |
Xavier Ducrohet | b1f6ad8 | 2012-12-21 09:54:02 -0800 | [diff] [blame] | 32 | extern int doSingleCrunch(Bundle* bundle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 33 | |
| 34 | extern int calcPercent(long uncompressedLen, long compressedLen); |
| 35 | |
| 36 | extern android::status_t writeAPK(Bundle* bundle, |
| 37 | const sp<AaptAssets>& assets, |
| 38 | const android::String8& outputFile); |
| 39 | |
Josiah Gaskin | 8a39da8 | 2011-06-06 17:00:35 -0700 | [diff] [blame] | 40 | extern android::status_t updatePreProcessedCache(Bundle* bundle); |
| 41 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 42 | extern android::status_t buildResources(Bundle* bundle, |
| 43 | const sp<AaptAssets>& assets); |
| 44 | |
| 45 | extern android::status_t writeResourceSymbols(Bundle* bundle, |
| 46 | const sp<AaptAssets>& assets, const String8& pkgName, bool includePrivate); |
| 47 | |
Joe Onorato | 1553c82 | 2009-08-30 13:36:22 -0700 | [diff] [blame] | 48 | extern android::status_t writeProguardFile(Bundle* bundle, const sp<AaptAssets>& assets); |
| 49 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 50 | extern bool isValidResourceType(const String8& type); |
| 51 | |
| 52 | ssize_t processAssets(Bundle* bundle, ZipFile* zip, const sp<AaptAssets>& assets); |
| 53 | |
| 54 | extern status_t filterResources(Bundle* bundle, const sp<AaptAssets>& assets); |
| 55 | |
| 56 | int dumpResources(Bundle* bundle); |
| 57 | |
Joe Onorato | 1553c82 | 2009-08-30 13:36:22 -0700 | [diff] [blame] | 58 | String8 getAttribute(const ResXMLTree& tree, const char* ns, |
| 59 | const char* attr, String8* outError); |
| 60 | |
Josiah Gaskin | 03589cc | 2011-06-27 16:26:02 -0700 | [diff] [blame] | 61 | status_t writeDependencyPreReqs(Bundle* bundle, const sp<AaptAssets>& assets, |
| 62 | FILE* fp, bool includeRaw); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 63 | #endif // __MAIN_H |