]>
Commit | Line | Data |
---|---|---|
dadd9c1f TAOSP |
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 | ||
79e5d372 MA |
9 | #include <utils/Log.h> |
10 | #include <utils/threads.h> | |
11 | #include <utils/List.h> | |
12 | #include <utils/Errors.h> | |
dadd9c1f TAOSP |
13 | #include "Bundle.h" |
14 | #include "AaptAssets.h" | |
1f170917 | 15 | #include "ZipFile.h" |
dadd9c1f | 16 | |
dddb1fc7 JG |
17 | |
18 | /* Benchmarking Flag */ | |
19 | //#define BENCHMARK 1 | |
20 | ||
21 | #if BENCHMARK | |
22 | #include <time.h> | |
23 | #endif /* BENCHMARK */ | |
24 | ||
dadd9c1f TAOSP |
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); | |
dddb1fc7 | 31 | extern int doCrunch(Bundle* bundle); |
dadd9c1f TAOSP |
32 | |
33 | extern int calcPercent(long uncompressedLen, long compressedLen); | |
34 | ||
35 | extern android::status_t writeAPK(Bundle* bundle, | |
36 | const sp<AaptAssets>& assets, | |
37 | const android::String8& outputFile); | |
38 | ||
dddb1fc7 JG |
39 | extern android::status_t updatePreProcessedCache(Bundle* bundle); |
40 | ||
dadd9c1f TAOSP |
41 | extern android::status_t buildResources(Bundle* bundle, |
42 | const sp<AaptAssets>& assets); | |
43 | ||
44 | extern android::status_t writeResourceSymbols(Bundle* bundle, | |
45 | const sp<AaptAssets>& assets, const String8& pkgName, bool includePrivate); | |
46 | ||
6648ff78 JO |
47 | extern android::status_t writeProguardFile(Bundle* bundle, const sp<AaptAssets>& assets); |
48 | ||
dadd9c1f TAOSP |
49 | extern bool isValidResourceType(const String8& type); |
50 | ||
51 | ssize_t processAssets(Bundle* bundle, ZipFile* zip, const sp<AaptAssets>& assets); | |
52 | ||
53 | extern status_t filterResources(Bundle* bundle, const sp<AaptAssets>& assets); | |
54 | ||
55 | int dumpResources(Bundle* bundle); | |
56 | ||
6648ff78 JO |
57 | String8 getAttribute(const ResXMLTree& tree, const char* ns, |
58 | const char* attr, String8* outError); | |
59 | ||
b5a473da JG |
60 | status_t writeDependencyPreReqs(Bundle* bundle, const sp<AaptAssets>& assets, |
61 | FILE* fp, bool includeRaw); | |
dadd9c1f | 62 | #endif // __MAIN_H |