Mercurial > libervia-pubsub
annotate idavoll/idavoll.py @ 67:cdf17c4d3bf9
Made returning disco info use deferreds.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Sat, 06 Nov 2004 22:17:18 +0000 |
parents | 60e95c60252d |
children | 5d7a924ebddb |
rev | line source |
---|---|
1 | 1 from twisted.protocols.jabber import component |
2 from twisted.application import service | |
8 | 3 from twisted.python import components |
67
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
4 from twisted.internet import defer |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
5 import backend |
1 | 6 import pubsub |
7 import xmpp_error | |
8 | |
9 import sys | |
10 | |
8 | 11 NS_DISCO = 'http://jabber.org/protocol/disco' |
12 NS_DISCO_INFO = NS_DISCO + '#info' | |
13 NS_DISCO_ITEMS = NS_DISCO + '#items' | |
14 NS_VERSION = 'jabber:iq:version' | |
15 | |
1 | 16 IQ_GET = '/iq[@type="get"]' |
17 IQ_SET = '/iq[@type="set"]' | |
8 | 18 VERSION = IQ_GET + '/query[@xmlns="' + NS_VERSION + '"]' |
19 DISCO_INFO = IQ_GET + '/query[@xmlns="' + NS_DISCO_INFO + '"]' | |
20 DISCO_ITEMS = IQ_GET + '/query[@xmlns="' + NS_DISCO_ITEMS + '"]' | |
1 | 21 |
22 class IdavollService(component.Service): | |
23 | |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
24 def componentConnected(self, xmlstream): |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
25 self.xmlstream = xmlstream |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
26 xmlstream.addObserver(VERSION, self.onVersion, 1) |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
27 xmlstream.addObserver(DISCO_INFO, self.onDiscoInfo, 1) |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
28 xmlstream.addObserver(DISCO_ITEMS, self.onDiscoItems, 1) |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
29 xmlstream.addObserver(IQ_GET, self.iqFallback, -1) |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
30 xmlstream.addObserver(IQ_SET, self.iqFallback, -1) |
8 | 31 |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
32 def getFeatures(self, node): |
57
445a61f872b6
Use NodeCreationService for pgsql backend, too.
Ralph Meijer <ralphm@ik.nu>
parents:
52
diff
changeset
|
33 features = [] |
445a61f872b6
Use NodeCreationService for pgsql backend, too.
Ralph Meijer <ralphm@ik.nu>
parents:
52
diff
changeset
|
34 |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
35 if not node: |
57
445a61f872b6
Use NodeCreationService for pgsql backend, too.
Ralph Meijer <ralphm@ik.nu>
parents:
52
diff
changeset
|
36 features.extend([NS_DISCO_ITEMS, NS_VERSION]) |
445a61f872b6
Use NodeCreationService for pgsql backend, too.
Ralph Meijer <ralphm@ik.nu>
parents:
52
diff
changeset
|
37 |
67
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
38 return defer.succeed(features) |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
39 |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
40 def onVersion(self, iq): |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
41 iq.swapAttributeValues("to", "from") |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
42 iq["type"] = "result" |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
43 name = iq.addElement("name", None, 'Idavoll') |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
44 version = iq.addElement("version", None, '0.1') |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
45 self.send(iq) |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
46 iq.handled = True |
1 | 47 |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
48 def onDiscoInfo(self, iq): |
67
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
49 identities_deferreds = [] |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
50 features_deferreds = [] |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
51 node = iq.query.getAttribute("node") |
8 | 52 |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
53 for c in self.parent: |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
54 if components.implements(c, component.IService): |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
55 if hasattr(c, "getIdentities"): |
67
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
56 identities_deferreds.append(c.getIdentities(node)) |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
57 if hasattr(c, "getFeatures"): |
67
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
58 features_deferreds.append(c.getFeatures(node)) |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
59 print identities_deferreds |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
60 print features_deferreds |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
61 d1 = defer.DeferredList(identities_deferreds, fireOnOneErrback=1) |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
62 d2 = defer.DeferredList(features_deferreds, fireOnOneErrback=1) |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
63 d = defer.DeferredList([d1, d2], fireOnOneErrback=1) |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
64 d.addCallback(self._disco_info_results, iq, node) |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
65 d.addErrback(self._disco_info_error, iq) |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
66 d.addCallback(self.q) |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
67 d.addCallback(self.send) |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
68 |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
69 iq.handled = True |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
70 |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
71 def q(self, result): |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
72 print result |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
73 return result |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
74 |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
75 def _disco_info_results(self, results, iq, node): |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
76 identities = [] |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
77 for i in results[0][1]: |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
78 identities.extend(i[1]) |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
79 |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
80 features = [] |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
81 for f in results[1][1]: |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
82 features.extend(f[1]) |
8 | 83 |
57
445a61f872b6
Use NodeCreationService for pgsql backend, too.
Ralph Meijer <ralphm@ik.nu>
parents:
52
diff
changeset
|
84 if node and not features and not identities: |
67
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
85 return xmpp_error.error_from_iq(iq, 'item-not-found') |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
86 else: |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
87 iq.swapAttributeValues("to", "from") |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
88 iq["type"] = "result" |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
89 for identity in identities: |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
90 i = iq.query.addElement("identity") |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
91 i.attributes = identity |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
92 print features |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
93 for feature in features: |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
94 f = iq.query.addElement("feature") |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
95 f["var"] = feature |
8 | 96 |
67
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
97 |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
98 return iq |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
99 |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
100 def _disco_info_error(self, results, iq): |
cdf17c4d3bf9
Made returning disco info use deferreds.
Ralph Meijer <ralphm@ik.nu>
parents:
63
diff
changeset
|
101 return xmpp_error.error_from_iq(iq, 'internal-error') |
8 | 102 |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
103 def onDiscoItems(self, iq): |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
104 iq.swapAttributeValues("to", "from") |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
105 iq["type"] = "result" |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
106 iq.query.children = [] |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
107 self.send(iq) |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
108 |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
109 def iqFallback(self, iq): |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
110 if iq.handled == True: |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
111 return |
1 | 112 |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
113 self.send(xmpp_error.error_from_iq(iq, 'service-unavailable')) |
1 | 114 |
115 def makeService(config): | |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
116 serviceCollection = service.MultiService() |
1 | 117 |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
118 # set up Jabber Component |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
119 sm = component.buildServiceManager(config["jid"], config["secret"], |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
120 ("tcp:%s:%s" % (config["rhost"], config["rport"]))) |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
121 |
42
7d088c61e131
Make choice of backend an option to mktap. This includes the database
Ralph Meijer <ralphm@ik.nu>
parents:
35
diff
changeset
|
122 if config['backend'] == 'pgsql': |
7d088c61e131
Make choice of backend an option to mktap. This includes the database
Ralph Meijer <ralphm@ik.nu>
parents:
35
diff
changeset
|
123 import pgsql_backend as b |
7d088c61e131
Make choice of backend an option to mktap. This includes the database
Ralph Meijer <ralphm@ik.nu>
parents:
35
diff
changeset
|
124 st = b.Storage(user=config['dbuser'], database=config['dbname']) |
7d088c61e131
Make choice of backend an option to mktap. This includes the database
Ralph Meijer <ralphm@ik.nu>
parents:
35
diff
changeset
|
125 elif config['backend'] == 'memory': |
7d088c61e131
Make choice of backend an option to mktap. This includes the database
Ralph Meijer <ralphm@ik.nu>
parents:
35
diff
changeset
|
126 import memory_backend as b |
43
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
42
diff
changeset
|
127 st = b.Storage() |
42
7d088c61e131
Make choice of backend an option to mktap. This includes the database
Ralph Meijer <ralphm@ik.nu>
parents:
35
diff
changeset
|
128 |
43
9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Ralph Meijer <ralphm@ik.nu>
parents:
42
diff
changeset
|
129 bs = b.BackendService(st) |
1 | 130 |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
131 component.IService(bs).setServiceParent(sm) |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
132 |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
133 bsc = b.PublishService() |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
134 bsc.setServiceParent(bs) |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
135 component.IService(bsc).setServiceParent(sm) |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
136 |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
137 bsc = b.NotificationService() |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
138 bsc.setServiceParent(bs) |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
139 component.IService(bsc).setServiceParent(sm) |
1 | 140 |
52
0947b46c0968
Use ISubscriptionService support of PostgreSQL backend.
Ralph Meijer <ralphm@ik.nu>
parents:
43
diff
changeset
|
141 bsc = b.SubscriptionService() |
0947b46c0968
Use ISubscriptionService support of PostgreSQL backend.
Ralph Meijer <ralphm@ik.nu>
parents:
43
diff
changeset
|
142 bsc.setServiceParent(bs) |
0947b46c0968
Use ISubscriptionService support of PostgreSQL backend.
Ralph Meijer <ralphm@ik.nu>
parents:
43
diff
changeset
|
143 component.IService(bsc).setServiceParent(sm) |
0947b46c0968
Use ISubscriptionService support of PostgreSQL backend.
Ralph Meijer <ralphm@ik.nu>
parents:
43
diff
changeset
|
144 |
57
445a61f872b6
Use NodeCreationService for pgsql backend, too.
Ralph Meijer <ralphm@ik.nu>
parents:
52
diff
changeset
|
145 bsc = b.NodeCreationService() |
445a61f872b6
Use NodeCreationService for pgsql backend, too.
Ralph Meijer <ralphm@ik.nu>
parents:
52
diff
changeset
|
146 bsc.setServiceParent(bs) |
445a61f872b6
Use NodeCreationService for pgsql backend, too.
Ralph Meijer <ralphm@ik.nu>
parents:
52
diff
changeset
|
147 component.IService(bsc).setServiceParent(sm) |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
148 |
63
60e95c60252d
Setup AffiliationsService and matching protocol adapter for the pgsql
Ralph Meijer <ralphm@ik.nu>
parents:
57
diff
changeset
|
149 if config['backend'] == 'pgsql': |
60e95c60252d
Setup AffiliationsService and matching protocol adapter for the pgsql
Ralph Meijer <ralphm@ik.nu>
parents:
57
diff
changeset
|
150 bsc = b.AffiliationsService() |
60e95c60252d
Setup AffiliationsService and matching protocol adapter for the pgsql
Ralph Meijer <ralphm@ik.nu>
parents:
57
diff
changeset
|
151 bsc.setServiceParent(bs) |
60e95c60252d
Setup AffiliationsService and matching protocol adapter for the pgsql
Ralph Meijer <ralphm@ik.nu>
parents:
57
diff
changeset
|
152 component.IService(bsc).setServiceParent(sm) |
60e95c60252d
Setup AffiliationsService and matching protocol adapter for the pgsql
Ralph Meijer <ralphm@ik.nu>
parents:
57
diff
changeset
|
153 |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
154 s = IdavollService() |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
155 s.setServiceParent(sm) |
1 | 156 |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
157 sm.setServiceParent(serviceCollection) |
1 | 158 |
32
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
159 # other stuff |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
160 |
ddc08757ec1d
Fire up several component.IServices that match the backend Services.
Ralph Meijer <ralphm@ik.nu>
parents:
26
diff
changeset
|
161 return sm |