]> git.saurik.com Git - android/aapt.git/blame - Main.h
Fix the single crunch command to return the right error code.
[android/aapt.git] / Main.h
CommitLineData
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
25extern int doVersion(Bundle* bundle);
26extern int doList(Bundle* bundle);
27extern int doDump(Bundle* bundle);
28extern int doAdd(Bundle* bundle);
29extern int doRemove(Bundle* bundle);
30extern int doPackage(Bundle* bundle);
dddb1fc7 31extern int doCrunch(Bundle* bundle);
853cbd58 32extern int doSingleCrunch(Bundle* bundle);
dadd9c1f
TAOSP
33
34extern int calcPercent(long uncompressedLen, long compressedLen);
35
36extern android::status_t writeAPK(Bundle* bundle,
37 const sp<AaptAssets>& assets,
38 const android::String8& outputFile);
39
dddb1fc7
JG
40extern android::status_t updatePreProcessedCache(Bundle* bundle);
41
dadd9c1f
TAOSP
42extern android::status_t buildResources(Bundle* bundle,
43 const sp<AaptAssets>& assets);
44
45extern android::status_t writeResourceSymbols(Bundle* bundle,
46 const sp<AaptAssets>& assets, const String8& pkgName, bool includePrivate);
47
6648ff78
JO
48extern android::status_t writeProguardFile(Bundle* bundle, const sp<AaptAssets>& assets);
49
dadd9c1f
TAOSP
50extern bool isValidResourceType(const String8& type);
51
52ssize_t processAssets(Bundle* bundle, ZipFile* zip, const sp<AaptAssets>& assets);
53
54extern status_t filterResources(Bundle* bundle, const sp<AaptAssets>& assets);
55
56int dumpResources(Bundle* bundle);
57
6648ff78
JO
58String8 getAttribute(const ResXMLTree& tree, const char* ns,
59 const char* attr, String8* outError);
60
b5a473da
JG
61status_t writeDependencyPreReqs(Bundle* bundle, const sp<AaptAssets>& assets,
62 FILE* fp, bool includeRaw);
dadd9c1f 63#endif // __MAIN_H