Main.h revision 6f1280cf170b358a57ff70341a9f2ad224e5a662
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 9#include <utils/Log.h> 10#include <utils/threads.h> 11#include <utils/List.h> 12#include <utils/Errors.h> 13#include <utils/StrongPointer.h> 14 15#include "AaptAssets.h" 16#include "ApkBuilder.h" 17#include "Bundle.h" 18#include "ResourceFilter.h" 19#include "ZipFile.h" 20 21 22/* Benchmarking Flag */ 23//#define BENCHMARK 1 24 25#if BENCHMARK 26 #include <time.h> 27#endif /* BENCHMARK */ 28 29class OutputSet; 30 31extern int doVersion(Bundle* bundle); 32extern int doList(Bundle* bundle); 33extern int doDump(Bundle* bundle); 34extern int doAdd(Bundle* bundle); 35extern int doRemove(Bundle* bundle); 36extern int doPackage(Bundle* bundle); 37extern int doCrunch(Bundle* bundle); 38extern int doSingleCrunch(Bundle* bundle); 39extern int runInDaemonMode(Bundle* bundle); 40 41extern int calcPercent(long uncompressedLen, long compressedLen); 42 43extern android::status_t writeAPK(Bundle* bundle, 44 const android::String8& outputFile, 45 const android::sp<OutputSet>& outputSet); 46 47extern android::status_t updatePreProcessedCache(Bundle* bundle); 48 49extern android::status_t buildResources(Bundle* bundle, 50 const sp<AaptAssets>& assets, sp<ApkBuilder>& builder); 51 52extern android::status_t writeResourceSymbols(Bundle* bundle, 53 const sp<AaptAssets>& assets, const String8& pkgName, 54 bool includePrivate, bool emitCallback); 55 56extern android::status_t writeProguardFile(Bundle* bundle, const sp<AaptAssets>& assets); 57 58extern bool isValidResourceType(const String8& type); 59 60extern status_t filterResources(Bundle* bundle, const sp<AaptAssets>& assets); 61 62int dumpResources(Bundle* bundle); 63 64status_t writeDependencyPreReqs(Bundle* bundle, const sp<AaptAssets>& assets, 65 FILE* fp, bool includeRaw); 66 67android::String8 parseResourceName(const String8& pathLeaf); 68 69#endif // __MAIN_H 70