Changeset 1623:f2ca0a6a73d5

Show
Ignore:
Timestamp:
11/17/08 18:25:31 (7 weeks ago)
Author:
Daniel Poelzleithner <poelzi@…>
Message:

rpc service updates
send startup/shutdown signals to dbus
fix forgotten api changes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pida/services/rpc/rpc.py

    r1611 r1623  
    5050        self.svc.boss.stop(force) 
    5151 
    52     def on_ping_session(self, session): 
    53         if session == session_name(): 
     52    def on_ping_session(self, workspace): 
     53        if session == workspace_name(): 
    5454            self.on_ping() 
    5555 
     
    6161            BUS.get_unique_name(), 
    6262            os.getpid(), 
    63             session_name(), 
     63            workspace_name(), 
    6464            self.svc.boss.get_service('project').get_project_name() or '', 
    6565            len(self.svc.boss.get_service('buffer').get_documents()) 
     
    7272 
    7373    @LSIGNAL(signature="sissi") 
    74     def PONG_PIDA_INSTANCE_EXT(self, uid, pid, session, project, opened_files): 
     74    def PONG_PIDA_INSTANCE_EXT(self, uid, pid, workspace, project, opened_files): 
     75        pass 
     76 
     77    @LSIGNAL(signature="sissi") 
     78    def PONG_PIDA_INSTANCE_EXT(self, uid, pid, workspace, project, opened_files): 
     79        pass 
     80 
     81    @LSIGNAL(signature="sis") 
     82    def PIDA_START(self, uid, pid, workspace): 
     83        pass 
     84 
     85    @LSIGNAL(signature="sis") 
     86    def PIDA_PRE_START(self, uid, pid, workspace): 
     87        pass 
     88 
     89    @LSIGNAL(signature="si") 
     90    def PIDA_STOP(self, uid, pid): 
     91        pass 
     92 
     93    @LSIGNAL(signature="si") 
     94    def PIDA_PRE_STOP(self, uid, pid): 
    7595        pass 
    7696 
     
    86106                _('DBus python bindings are missing. Limited functionality.'), 
    87107                title=_('Modules missing')) 
     108        else: 
     109            self.dbus.PIDA_START( 
     110                BUS.get_unique_name(), 
     111                os.getpid(), 
     112                workspace_name() 
     113            ) 
     114 
     115    def pre_start(self): 
     116        self.dbus.PIDA_PRE_START( 
     117            BUS.get_unique_name(), 
     118            os.getpid(), 
     119            workspace_name() 
     120        ) 
     121        return True 
     122 
     123    def pre_stop(self): 
     124        self.dbus.PIDA_PRE_STOP( 
     125            BUS.get_unique_name(), 
     126            os.getpid() 
     127        ) 
     128        return True 
     129 
     130    def stop(self): 
     131        self.dbus.PIDA_STOP( 
     132            BUS.get_unique_name(), 
     133            os.getpid() 
     134        ) 
     135        return True 
    88136 
    89137# Required Service attribute for service loading