本文整理汇总了Python中activity.Activity.join方法的典型用法代码示例。如果您正苦于以下问题:Python Activity.join方法的具体用法?Python Activity.join怎么用?Python Activity.join使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类activity.Activity
的用法示例。
在下文中一共展示了Activity.join方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: activity_shared
# 需要导入模块: from activity import Activity [as 别名]
# 或者: from activity.Activity import join [as 别名]
self._get_preferred_plugin(), 0,
id=actid, type=atype,
name=name, color=self._owner.props.color,
local=True, private=True, tags=tags)
activity.connect("validity-changed",
self._activity_validity_changed_cb)
activity.connect("disappeared", self._activity_disappeared_cb)
self._activities_by_id[actid] = activity
def activity_shared():
tp, room = activity.room_details
self._activities_by_handle[tp][room] = activity
async_cb(activity.object_path())
activity.join(activity_shared, async_err_cb, sharing=True,
private=private, sender=sender)
# local activities are valid at creation by definition, but we can't
# connect to the activity's validity-changed signal until its already
# issued the signal, which happens in the activity's constructor
# for local activities.
self._activity_validity_changed_cb(activity, activity.props.valid)
def _activity_validity_changed_cb(self, activity, valid):
if valid:
self.ActivityAppeared(activity.object_path())
_logger.debug("New Activity: %s (%s)", activity.props.name,
activity.props.id)
else:
self.ActivityDisappeared(activity.object_path())
_logger.debug("Activity disappeared: %s (%s)",