2009-03-03 19:31:44 -08:00
|
|
|
//
|
|
|
|
// Copyright 2006 The Android Open Source Project
|
|
|
|
//
|
|
|
|
// Some global defines that don't really merit their own header.
|
|
|
|
//
|
|
|
|
#ifndef __MAIN_H
|
|
|
|
#define __MAIN_H
|
|
|
|
|
2009-05-31 19:13:00 -07:00
|
|
|
#include <utils/Log.h>
|
|
|
|
#include <utils/threads.h>
|
|
|
|
#include <utils/List.h>
|
|
|
|
#include <utils/Errors.h>
|
2009-03-03 19:31:44 -08:00
|
|
|
#include "Bundle.h"
|
|
|
|
#include "AaptAssets.h"
|
2009-06-05 14:56:35 -07:00
|
|
|
#include "ZipFile.h"
|
2009-03-03 19:31:44 -08:00
|
|
|
|
2011-06-06 17:00:35 -07:00
|
|
|
|
|
|
|
/* Benchmarking Flag */
|
|
|
|
//#define BENCHMARK 1
|
|
|
|
|
|
|
|
#if BENCHMARK
|
|
|
|
#include <time.h>
|
|
|
|
#endif /* BENCHMARK */
|
|
|
|
|
2009-03-03 19:31:44 -08:00
|
|
|
extern int doVersion(Bundle* bundle);
|
|
|
|
extern int doList(Bundle* bundle);
|
|
|
|
extern int doDump(Bundle* bundle);
|
|
|
|
extern int doAdd(Bundle* bundle);
|
|
|
|
extern int doRemove(Bundle* bundle);
|
|
|
|
extern int doPackage(Bundle* bundle);
|
2011-06-06 17:00:35 -07:00
|
|
|
extern int doCrunch(Bundle* bundle);
|
2009-03-03 19:31:44 -08:00
|
|
|
|
|
|
|
extern int calcPercent(long uncompressedLen, long compressedLen);
|
|
|
|
|
|
|
|
extern android::status_t writeAPK(Bundle* bundle,
|
|
|
|
const sp<AaptAssets>& assets,
|
|
|
|
const android::String8& outputFile);
|
|
|
|
|
2011-06-06 17:00:35 -07:00
|
|
|
extern android::status_t updatePreProcessedCache(Bundle* bundle);
|
|
|
|
|
2009-03-03 19:31:44 -08:00
|
|
|
extern android::status_t buildResources(Bundle* bundle,
|
|
|
|
const sp<AaptAssets>& assets);
|
|
|
|
|
|
|
|
extern android::status_t writeResourceSymbols(Bundle* bundle,
|
|
|
|
const sp<AaptAssets>& assets, const String8& pkgName, bool includePrivate);
|
|
|
|
|
2009-08-30 13:36:22 -07:00
|
|
|
extern android::status_t writeProguardFile(Bundle* bundle, const sp<AaptAssets>& assets);
|
|
|
|
|
2009-03-03 19:31:44 -08:00
|
|
|
extern bool isValidResourceType(const String8& type);
|
|
|
|
|
|
|
|
ssize_t processAssets(Bundle* bundle, ZipFile* zip, const sp<AaptAssets>& assets);
|
|
|
|
|
|
|
|
extern status_t filterResources(Bundle* bundle, const sp<AaptAssets>& assets);
|
|
|
|
|
|
|
|
int dumpResources(Bundle* bundle);
|
|
|
|
|
2009-08-30 13:36:22 -07:00
|
|
|
String8 getAttribute(const ResXMLTree& tree, const char* ns,
|
|
|
|
const char* attr, String8* outError);
|
|
|
|
|
2011-06-27 16:26:02 -07:00
|
|
|
status_t writeDependencyPreReqs(Bundle* bundle, const sp<AaptAssets>& assets,
|
|
|
|
FILE* fp, bool includeRaw);
|
2009-03-03 19:31:44 -08:00
|
|
|
#endif // __MAIN_H
|