1d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate// 2d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate// Copyright 2012 The Android Open Source Project 3d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate// 4d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate// Manage a resource ID cache. 5d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate 6d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate#ifndef RESOURCE_ID_CACHE_H 7d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate#define RESOURCE_ID_CACHE_H 8d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate 9d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tatenamespace android { 10d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tateclass android::String16; 11d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate 12d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tateclass ResourceIdCache { 13d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tatepublic: 14d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate static uint32_t lookup(const android::String16& package, 15d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate const android::String16& type, 16d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate const android::String16& name, 17d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate bool onlyPublic); 18d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate 19d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate static uint32_t store(const android::String16& package, 20d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate const android::String16& type, 21d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate const android::String16& name, 22d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate bool onlyPublic, 23d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate uint32_t resId); 24d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate 25d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate static void dump(void); 26d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate}; 27d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate 28d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate} 29d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate 30d8dde13a63565dcd72bcf03a5088407b737ba793Christopher Tate#endif 31