Adam Lesinski | 282e181 | 2014-01-23 18:17:42 -0800 | [diff] [blame] | 1 | // |
| 2 | // Copyright 2012 The Android Open Source Project |
| 3 | // |
| 4 | // Manage a resource ID cache. |
| 5 | |
| 6 | #ifndef RESOURCE_ID_CACHE_H |
| 7 | #define RESOURCE_ID_CACHE_H |
| 8 | |
Adam Lesinski | de898ff | 2014-01-29 18:20:45 -0800 | [diff] [blame] | 9 | #include <utils/String16.h> |
| 10 | |
Adam Lesinski | 282e181 | 2014-01-23 18:17:42 -0800 | [diff] [blame] | 11 | namespace android { |
Adam Lesinski | 282e181 | 2014-01-23 18:17:42 -0800 | [diff] [blame] | 12 | |
| 13 | class ResourceIdCache { |
| 14 | public: |
Adam Lesinski | de898ff | 2014-01-29 18:20:45 -0800 | [diff] [blame] | 15 | static uint32_t lookup(const String16& package, |
| 16 | const String16& type, |
| 17 | const String16& name, |
Adam Lesinski | 282e181 | 2014-01-23 18:17:42 -0800 | [diff] [blame] | 18 | bool onlyPublic); |
| 19 | |
Adam Lesinski | de898ff | 2014-01-29 18:20:45 -0800 | [diff] [blame] | 20 | static uint32_t store(const String16& package, |
| 21 | const String16& type, |
| 22 | const String16& name, |
Adam Lesinski | 282e181 | 2014-01-23 18:17:42 -0800 | [diff] [blame] | 23 | bool onlyPublic, |
| 24 | uint32_t resId); |
| 25 | |
| 26 | static void dump(void); |
| 27 | }; |
| 28 | |
| 29 | } |
| 30 | |
| 31 | #endif |