def _sharing_setup(self): if self.activity._shared_activity is None: logger.error('Failed to share or join activity') return self.conn = self.activity._shared_activity.telepathy_conn self.tubes_chan = self.activity._shared_activity.telepathy_tubes_chan self.text_chan = self.activity._shared_activity.telepathy_text_chan self.tubes_chan[telepathy.CHANNEL_TYPE_TUBES].connect_to_signal( 'NewTube', self._new_tube_cb) self.activity._shared_activity.connect('buddy-joined', self._buddy_joined_cb) self.activity._shared_activity.connect('buddy-left', self._buddy_left_cb) # Optional - included for example: # Find out who's already in the shared activity: for buddy in self.activity._shared_activity.get_joined_buddies(): logger.debug('Buddy %s is already in the activity', buddy.props.nick)
def _list_tubes_error_cb(self, e): logger.error('ListTubes() failed: %s', e)