osobject.h 1.0 KB

12345678910111213141516171819202122232425
  1. #define OSDictionary_ItemCount(dict) rk32(dict+20)
  2. #define OSDictionary_ItemBuffer(dict) rk64(dict+32)
  3. #define OSDictionary_ItemKey(buffer, idx) rk64(buffer+16*idx)
  4. #define OSDictionary_ItemValue(buffer, idx) rk64(buffer+16*idx+8)
  5. #define OSString_CStringPtr(str) rk64(str + 0x10)
  6. #define OSArray_ItemCount(arr) rk32(arr+0x14)
  7. #define OSArray_ItemBuffer(arr) rk64(arr+32)
  8. // see osobject.c for info
  9. int OSDictionary_SetItem(uint64_t dict, const char *key, uint64_t val);
  10. uint64_t OSDictionary_GetItem(uint64_t dict, const char *key);
  11. int OSDictionary_Merge(uint64_t dict, uint64_t aDict);
  12. void OSArray_RemoveObject(uint64_t array, unsigned int idx);
  13. uint64_t OSArray_GetObject(uint64_t array, unsigned int idx);
  14. int OSArray_Merge(uint64_t array, uint64_t aArray);
  15. uint64_t OSUnserializeXML(const char* buffer);
  16. void OSObject_Release(uint64_t osobject);
  17. void OSObject_Retain(uint64_t osobject);
  18. uint32_t OSObject_GetRetainCount(uint64_t osobject);
  19. unsigned int OSString_GetLength(uint64_t osstring);
  20. char *OSString_CopyString(uint64_t osstring);