+ # Use this function instead of _implement_channel_class.
+ def implement_channel_classes(self, type, make_channel, classes):
+ """Implement channel types in the channel manager, and add channel
+ classes that are retrieved in RequestableChannelClasses.
+
+ @type: the channel type
+ @make_channel: a function to call which returns a Channel object
+ @classes: a list of channel classes. E.g.
+
+ [ ( { '...ChannelType': '...Text', '...TargetHandleType': HANDLE_TYPE_CONTACT },
+ ['...TargetHandle'] )
+ ]
+
+ See the spec for more documentation on the
+ Requestable_Channel_Class struct.
+ """
+ self._requestable_channels[type] = make_channel
+ self._channels.setdefault(type, {})
+
+ self._requestables[type] = classes
+