1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: Dynamic Mgmt Interface Header |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #ifndef XADYNINTMGMTITF_H |
18 #ifndef XADYNINTMGMTITF_H |
19 #define XADYNINTMGMTITF_H |
19 #define XADYNINTMGMTITF_H |
20 |
20 |
21 #include "openmaxalwrapper.h" |
21 #include "openmaxalwrapper.h" |
24 |
24 |
25 /** MACROS **/ |
25 /** MACROS **/ |
26 |
26 |
27 /** TYPES **/ |
27 /** TYPES **/ |
28 /* object implementation-specific DIM methods */ |
28 /* object implementation-specific DIM methods */ |
29 typedef XAresult (*xaDoAddItfImpl)(XAObjectItf self, XAObjItfMapEntry *mapEntry ); |
29 typedef XAresult (*xaDoAddItfImpl)(XAObjectItf self, |
30 typedef XAresult (*xaDoResumeItfImpl)(XAObjectItf self, XAObjItfMapEntry *mapEntry ); |
30 XAObjItfMapEntry *mapEntry); |
31 typedef XAresult (*xaDoRemoveItfImpl)(XAObjectItf self, XAObjItfMapEntry *mapEntry ); |
31 typedef XAresult (*xaDoResumeItfImpl)(XAObjectItf self, |
|
32 XAObjItfMapEntry *mapEntry); |
|
33 typedef XAresult (*xaDoRemoveItfImpl)(XAObjectItf self, |
|
34 XAObjItfMapEntry *mapEntry); |
32 |
35 |
33 /** ENUMERATIONS **/ |
36 /** ENUMERATIONS **/ |
34 |
37 |
35 /** STRUCTURES **/ |
38 /** STRUCTURES **/ |
36 /* Definition of XADynamicInterfaceManagementItf implementation */ |
39 /* Definition of XADynamicInterfaceManagementItf implementation */ |
37 typedef struct XADIMItfImpl_ |
40 typedef struct XADIMItfImpl_ |
38 { |
41 { |
39 /* parent interface */ |
42 /* parent interface */ |
40 struct XADynamicInterfaceManagementItf_ itf; |
43 struct XADynamicInterfaceManagementItf_ itf; |
41 /* pointer to self */ |
44 /* pointer to self */ |
42 struct XADIMItfImpl_* self; |
45 struct XADIMItfImpl_* self; |
43 |
46 |
44 /* variables */ |
47 /* variables */ |
45 /* pointer to parent object */ |
48 /* pointer to parent object */ |
46 XAObjectItf parent; |
49 XAObjectItf parent; |
47 /* pointers to implementation-specific methods */ |
50 /* pointers to implementation-specific methods */ |
48 xaDoAddItfImpl DoAddItfImpl; |
51 xaDoAddItfImpl DoAddItfImpl; |
49 xaDoResumeItfImpl DoResumeItfImpl; |
52 xaDoResumeItfImpl DoResumeItfImpl; |
50 xaDoRemoveItfImpl DoRemoveItfImpl; |
53 xaDoRemoveItfImpl DoRemoveItfImpl; |
51 |
54 |
52 /* client callback */ |
55 /* client callback */ |
53 XADynamicInterfaceManagementItf dimCbPtrToSelf; |
56 XADynamicInterfaceManagementItf dimCbPtrToSelf; |
55 void* dimCbContext; |
58 void* dimCbContext; |
56 XAImplThreadHandle asyncThr; |
59 XAImplThreadHandle asyncThr; |
57 XAboolean asyncOngoing; |
60 XAboolean asyncOngoing; |
58 XAInterfaceID asyncID; |
61 XAInterfaceID asyncID; |
59 |
62 |
60 } XADIMItfImpl; |
63 } XADIMItfImpl; |
61 |
64 |
62 /* Base interface XADynamicInterfaceManagementItf implementation */ |
65 /* Base interface XADynamicInterfaceManagementItf implementation */ |
63 XAresult XADIMItfImpl_AddInterface(XADynamicInterfaceManagementItf self, |
66 XAresult XADIMItfImpl_AddInterface(XADynamicInterfaceManagementItf self, |
64 const XAInterfaceID iid, XAboolean async); |
67 const XAInterfaceID iid, XAboolean async); |
65 |
68 |
66 XAresult XADIMItfImpl_RemoveInterface(XADynamicInterfaceManagementItf self, |
69 XAresult XADIMItfImpl_RemoveInterface(XADynamicInterfaceManagementItf self, |
67 const XAInterfaceID iid); |
70 const XAInterfaceID iid); |
68 |
71 |
69 XAresult XADIMItfImpl_ResumeInterface(XADynamicInterfaceManagementItf self, |
72 XAresult XADIMItfImpl_ResumeInterface(XADynamicInterfaceManagementItf self, |
70 const XAInterfaceID iid, XAboolean async); |
73 const XAInterfaceID iid, XAboolean async); |
71 |
74 |
72 XAresult XADIMItfImpl_RegisterCallback(XADynamicInterfaceManagementItf self, |
75 XAresult XADIMItfImpl_RegisterCallback(XADynamicInterfaceManagementItf self, |
73 xaDynamicInterfaceManagementCallback callback, |
76 xaDynamicInterfaceManagementCallback callback, void * pContext); |
74 void * pContext); |
|
75 |
77 |
76 /* XADIMItfImpl -specific methods */ |
78 /* XADIMItfImpl -specific methods */ |
77 XADIMItfImpl* XADIMItfImpl_Create(void); |
79 XADIMItfImpl* XADIMItfImpl_Create(void); |
78 void XADIMItfImpl_Free(XADIMItfImpl* self); |
80 void XADIMItfImpl_Free(XADIMItfImpl* self); |
79 |
81 |
80 void XADIMItfImpl_Init( XADIMItfImpl* self, |
82 void XADIMItfImpl_Init(XADIMItfImpl* self, XAObjectItf parent, |
81 XAObjectItf parent, |
83 xaDoAddItfImpl doAdd, xaDoResumeItfImpl doResume, |
82 xaDoAddItfImpl doAdd, |
84 xaDoRemoveItfImpl doRemove); |
83 xaDoResumeItfImpl doResume, |
|
84 xaDoRemoveItfImpl doRemove); |
|
85 |
85 |
86 void XADIMItfImpl_SendCbEvent( XADIMItfImpl* self, |
86 void XADIMItfImpl_SendCbEvent(XADIMItfImpl* self, XAuint32 event, |
87 XAuint32 event, |
87 XAresult result, const XAInterfaceID iid); |
88 XAresult result, |
|
89 const XAInterfaceID iid ); |
|
90 |
88 |
91 /* methods for asynchronous service */ |
89 /* methods for asynchronous service */ |
92 void* XADIMItfImpl_AsyncAddItf(void* args); |
90 void* XADIMItfImpl_AsyncAddItf(void* args); |
93 XAresult XADIMItfImpl_DoAddItf(XADIMItfImpl* impl, const XAInterfaceID iid); |
91 XAresult XADIMItfImpl_DoAddItf(XADIMItfImpl* impl, const XAInterfaceID iid); |
94 void* XADIMItfImpl_AsyncResumeItf(void* args); |
92 void* XADIMItfImpl_AsyncResumeItf(void* args); |
95 XAresult XADIMItfImpl_DoResumeItf(XADIMItfImpl* impl, const XAInterfaceID iid); |
93 XAresult |
96 |
94 XADIMItfImpl_DoResumeItf(XADIMItfImpl* impl, const XAInterfaceID iid); |
97 |
95 |
98 #endif /* XADYNINTMGMTITF_H */ |
96 #endif /* XADYNINTMGMTITF_H */ |