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
|
# -*- Mode: Python; py-indent-offset: 4 -*-
import gobject
del gobject
# load the bonobo typelib
import ORBit
ORBit.load_typelib('Bonobo')
del ORBit
import activation
from _bonobo import *
class UnknownBaseImpl(object):
def __init__(self):
self.__bobj = ForeignObject(self._this())
self.__bobj.connect("destroy", self.__destroy)
def get_bonobo_object(self):
return self.__bobj
def ref(self):
self.__bobj.ref()
def unref(self):
self.__bobj.unref()
def queryInterface(self, repoid):
return self.__bobj.query_local_interface(repoid).corba_objref()
def __destroy(self, foreign):
# print "Deactivating Object"
poa = self._default_POA()
id = poa.servant_to_id(self)
poa.deactivate_object(id)
# print "Removing reference to ForeignObject"
self.__bobj = None
# print "Deactivating Object Done"
|