File: IAndroidShm.h

package info (click to toggle)
jackd2 1.9.22~dfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,984 kB
  • sloc: cpp: 48,694; ansic: 23,970; python: 13,621; sh: 228; makefile: 31
file content (41 lines) | stat: -rw-r--r-- 1,048 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef IANDROIDSHM
#define IANDROIDSHM

#include <binder/IInterface.h>
#include <binder/IMemory.h>

 namespace android {

	enum {
		HW_GETBUFFER = IBinder::FIRST_CALL_TRANSACTION, 
		HW_MULTIPLY,
		HW_STARTSERVER,
		HW_MAKECLIENT,
		HW_SENDCOMMAND,
		HW_LOADSO,
		HW_ALLOC_SHM,
		HW_REMOVE_SHM,
		HW_IS_ALLOCATED,
		HW_SET_REGISTRY_INDEX,
		HW_GET_REGISTRY_INDEX,
		HW_INIT_SEMAPHORE
	};
	
	class IAndroidShm: public IInterface {
		public:
			DECLARE_META_INTERFACE(AndroidShm);

			virtual sp<IMemoryHeap> getBuffer(int index) = 0;
			virtual int sendCommand(const char *command) = 0;
			virtual int allocShm(const int size) = 0; // if negative return value is error
			virtual int removeShm(const unsigned int index) = 0; // shared memory  
			virtual int isAllocated(const unsigned int index) = 0; // allocated  Ȯ
			virtual int setRegistryIndex(const unsigned int index) = 0;
			virtual int getRegistryIndex() = 0;

			// for named semaphore simulation
			virtual sp<IMemoryHeap> InitSemaphore(const char* name) = 0;
	};
};

#endif