blob: 3ba4f39062f81aeb71a23d494ce65ad7432baa43 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001//
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 Agopian3b4062e2009-05-31 19:13:00 -07009#include <utils/Log.h>
10#include <utils/threads.h>
11#include <utils/List.h>
12#include <utils/Errors.h>
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080013#include "Bundle.h"
14#include "AaptAssets.h"
Mathias Agopian55e3d602009-06-05 14:56:35 -070015#include "ZipFile.h"
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080016
17extern int doVersion(Bundle* bundle);
18extern int doList(Bundle* bundle);
19extern int doDump(Bundle* bundle);
20extern int doAdd(Bundle* bundle);
21extern int doRemove(Bundle* bundle);
22extern int doPackage(Bundle* bundle);
23
24extern int calcPercent(long uncompressedLen, long compressedLen);
25
26extern android::status_t writeAPK(Bundle* bundle,
27 const sp<AaptAssets>& assets,
28 const android::String8& outputFile);
29
30extern android::status_t buildResources(Bundle* bundle,
31 const sp<AaptAssets>& assets);
32
33extern android::status_t writeResourceSymbols(Bundle* bundle,
34 const sp<AaptAssets>& assets, const String8& pkgName, bool includePrivate);
35
Joe Onorato1553c822009-08-30 13:36:22 -070036extern android::status_t writeProguardFile(Bundle* bundle, const sp<AaptAssets>& assets);
37
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080038extern bool isValidResourceType(const String8& type);
39
40ssize_t processAssets(Bundle* bundle, ZipFile* zip, const sp<AaptAssets>& assets);
41
42extern status_t filterResources(Bundle* bundle, const sp<AaptAssets>& assets);
43
44int dumpResources(Bundle* bundle);
45
Joe Onorato1553c822009-08-30 13:36:22 -070046String8 getAttribute(const ResXMLTree& tree, const char* ns,
47 const char* attr, String8* outError);
48
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080049#endif // __MAIN_H