Changeset 109 for trunk/desktop
- Timestamp:
- Nov 25, 2006, 9:43:05 PM (19 years ago)
- Location:
- trunk/desktop
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/desktop/class_c/wpobject.c
r105 r109 82 82 { 83 83 /* WPObjectData* nomThis=WPObjectGetData(nomSelf); */ 84 CORBA_boolean nomRetval;85 84 86 85 if(!pByte) … … 112 111 /* WPObjectData* nomThis=WPObjectGetData(nomSelf); */ 113 112 114 #if 0 115 /* orbit-idl-c-stubs.c, VoyagerWriteProtoForParentCall line 84 */ 113 _wpUnInitData(nomSelf, ev); 114 116 115 WPObject_nomUninit_parent(nomSelf, ev); 117 #endif118 116 } 119 117 … … 137 135 return nomRetval; 138 136 } 137 138 139 NOM_Scope void NOMLINK impl_WPObject_wpLockObject(WPObject* nomSelf, CORBA_Environment *ev) 140 { 141 WPObjectData* nomThis=WPObjectGetData(nomSelf); 142 143 g_atomic_int_inc(&_iLockCounter); 144 } 145 146 NOM_Scope CORBA_boolean NOMLINK impl_WPObject_wpUnlockObject(WPObject* nomSelf, CORBA_Environment *ev) 147 { 148 WPObjectData* nomThis=WPObjectGetData(nomSelf); 149 150 /* We return TRUE if the counter is 0 */ 151 if(g_atomic_int_dec_and_test(&_iLockCounter)) 152 { 153 /* Counter is 0 so the object should go dormant */ 154 return TRUE; 155 } 156 return FALSE; 157 } 158 159 NOM_Scope CORBA_boolean NOMLINK impl_WPObject_wpObjectIsLocked(WPObject* nomSelf, CORBA_Environment *ev) 160 { 161 WPObjectData* nomThis=WPObjectGetData(nomSelf); 162 163 return g_atomic_int_get(&_iLockCounter) && TRUE; 164 } 165 -
trunk/desktop/idl/wpobject.idl
r104 r109 38 38 #include <nomobj.idl> 39 39 40 #include "wpnativetypes.idl" 41 40 42 interface WPObject : NOMObject 41 43 { … … 60 62 void wpUnInitData(); 61 63 gpointer wpOpen(in gpointer ptrReserved, in unsigned long ulView, in gpointer ptrParams); 64 void wpLockObject(); 65 boolean wpUnlockObject(); 66 boolean wpObjectIsLocked(); 62 67 63 68 NOMOVERRIDE(nomInit); 64 69 NOMOVERRIDE(nomUninit); 70 NOMINSTANCEVAR(gint iLockCounter); 65 71 }; 66 72 67 73 #endif 74 75 76 77 78
Note:
See TracChangeset
for help on using the changeset viewer.