jack2 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.0KB

  1. #ifndef IANDROIDSHM
  2. #define IANDROIDSHM
  3. #include <binder/IInterface.h>
  4. #include <binder/IMemory.h>
  5. namespace android {
  6. enum {
  7. HW_GETBUFFER = IBinder::FIRST_CALL_TRANSACTION,
  8. HW_MULTIPLY,
  9. HW_STARTSERVER,
  10. HW_MAKECLIENT,
  11. HW_SENDCOMMAND,
  12. HW_LOADSO,
  13. HW_ALLOC_SHM,
  14. HW_REMOVE_SHM,
  15. HW_IS_ALLOCATED,
  16. HW_SET_REGISTRY_INDEX,
  17. HW_GET_REGISTRY_INDEX,
  18. HW_INIT_SEMAPHORE
  19. };
  20. class IAndroidShm: public IInterface {
  21. public:
  22. DECLARE_META_INTERFACE(AndroidShm);
  23. virtual sp<IMemoryHeap> getBuffer(int index) = 0;
  24. virtual int sendCommand(const char *command) = 0;
  25. virtual int allocShm(const int size) = 0; // if negative return value is error
  26. virtual int removeShm(const unsigned int index) = 0; // shared memory Á¦°Å
  27. virtual int isAllocated(const unsigned int index) = 0; // allocated ¿©ºÎ È®ÀÎ
  28. virtual int setRegistryIndex(const unsigned int index) = 0;
  29. virtual int getRegistryIndex() = 0;
  30. // for named semaphore simulation
  31. virtual sp<IMemoryHeap> InitSemaphore(const char* name) = 0;
  32. };
  33. };
  34. #endif