Mercurial > libervia-backend
comparison src/plugins/plugin_misc_groupblog.py @ 372:f964dcec1611
core: plugins refactored according to bridge + updatedValue now use profile
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 06 Jul 2011 01:06:18 +0200 |
parents | 2572351d875a |
children | cf005701624b |
comparison
equal
deleted
inserted
replaced
371:3ea41a199b36 | 372:f964dcec1611 |
---|---|
67 self.host = host | 67 self.host = host |
68 self._blog_nodes={} #keep association betweek [profile][node] and [groups] | 68 self._blog_nodes={} #keep association betweek [profile][node] and [groups] |
69 for i in range(1,21): | 69 for i in range(1,21): |
70 self.host.plugins["XEP-0163"].addPEPEvent("MICROBLOG_%02d" % i, NS_MICROBLOG % i, self.groupblogCB, None) | 70 self.host.plugins["XEP-0163"].addPEPEvent("MICROBLOG_%02d" % i, NS_MICROBLOG % i, self.groupblogCB, None) |
71 | 71 |
72 host.bridge.addMethod("cleanBlogCollection", ".communication", in_sign='s', out_sign='', | 72 host.bridge.addMethod("cleanBlogCollection", ".plugin", in_sign='s', out_sign='', |
73 method=self.cleanBlogCollection, | 73 method=self.cleanBlogCollection, |
74 doc = { | 74 doc = { |
75 }) | 75 }) |
76 | 76 |
77 host.bridge.addMethod("getMblogNodes", ".communication", in_sign='s', out_sign='a{sas}', | 77 host.bridge.addMethod("getMblogNodes", ".plugin", in_sign='s', out_sign='a{sas}', |
78 method=self.getMblogNodes, | 78 method=self.getMblogNodes, |
79 async = True, | 79 async = True, |
80 doc = { 'summary':"retrieve mblog node, and their association with roster's groups", | 80 doc = { 'summary':"retrieve mblog node, and their association with roster's groups", |
81 'param_0':'%(doc_profile)s', | 81 'param_0':'%(doc_profile)s', |
82 'return':'list of microblog data (dict)' | 82 'return':'list of microblog data (dict)' |
83 }) | 83 }) |
84 | 84 |
85 host.bridge.addMethod("sendGroupBlog", ".communication", in_sign='asss', out_sign='', | 85 host.bridge.addMethod("sendGroupBlog", ".plugin", in_sign='asss', out_sign='', |
86 method=self.sendGroupBlog, | 86 method=self.sendGroupBlog, |
87 doc = { 'summary':"Send a microblog to a list of groups", | 87 doc = { 'summary':"Send a microblog to a list of groups", |
88 'param_0':'list of groups which can read the microblog', | 88 'param_0':'list of groups which can read the microblog', |
89 'param_1':'text to send', | 89 'param_1':'text to send', |
90 'param_2':'%(doc_profile)s' | 90 'param_2':'%(doc_profile)s' |
91 }) | 91 }) |
92 | 92 |
93 host.bridge.addMethod("subscribeGroupBlog", ".communication", in_sign='ss', out_sign='', | 93 host.bridge.addMethod("subscribeGroupBlog", ".plugin", in_sign='ss', out_sign='', |
94 method=self.subscribeGroupBlog, | 94 method=self.subscribeGroupBlog, |
95 doc = { 'summary':"Subscribe to the group blog of somebody", | 95 doc = { 'summary':"Subscribe to the group blog of somebody", |
96 'param_0':'jid of the group node published', | 96 'param_0':'jid of the group node published', |
97 'param_1':'%(doc_profile)s' | 97 'param_1':'%(doc_profile)s' |
98 }) | 98 }) |