|
|
|
@ -24,7 +24,7 @@ class ActivityHandle(object):
|
|
|
|
|
"""Data structure storing simple activity metadata"""
|
|
|
|
|
|
|
|
|
|
def __init__(self, activity_id=None, object_id=None, uri=None,
|
|
|
|
|
handle_invite=False):
|
|
|
|
|
invited=False):
|
|
|
|
|
"""Initialise the handle from activity_id
|
|
|
|
|
|
|
|
|
|
activity_id -- unique id for the activity to be
|
|
|
|
@ -46,18 +46,18 @@ class ActivityHandle(object):
|
|
|
|
|
activity, rather than a journal object
|
|
|
|
|
(downloads stored on the file system for
|
|
|
|
|
example or web pages)
|
|
|
|
|
handle_invite -- the activity is being launched for handling an invite
|
|
|
|
|
from the network
|
|
|
|
|
invited -- the activity is being launched for handling an invite
|
|
|
|
|
from the network
|
|
|
|
|
"""
|
|
|
|
|
self.activity_id = activity_id
|
|
|
|
|
self.object_id = object_id
|
|
|
|
|
self.uri = uri
|
|
|
|
|
self.handle_invite = handle_invite
|
|
|
|
|
self.invited = invited
|
|
|
|
|
|
|
|
|
|
def get_dict(self):
|
|
|
|
|
"""Retrieve our settings as a dictionary"""
|
|
|
|
|
result = {'activity_id': self.activity_id,
|
|
|
|
|
'handle_invite': self.handle_invite}
|
|
|
|
|
'invited': self.invited}
|
|
|
|
|
if self.object_id:
|
|
|
|
|
result['object_id'] = self.object_id
|
|
|
|
|
if self.uri:
|
|
|
|
@ -71,5 +71,5 @@ def create_from_dict(handle_dict):
|
|
|
|
|
result = ActivityHandle(handle_dict['activity_id'],
|
|
|
|
|
object_id = handle_dict.get('object_id'),
|
|
|
|
|
uri = handle_dict.get('uri'),
|
|
|
|
|
handle_invite = handle_dict.get('handle_invite'))
|
|
|
|
|
invited = handle_dict.get('invited'))
|
|
|
|
|
return result
|
|
|
|
|