GObjectification of protocols
tomkiewicz at cpw.pidgin.im
Mon Aug 19 12:54:13 EDT 2013
18 sie 2013 21:53, "Ankit Vani" <a at nevitus.org> napisał(a):
> This makes using smaller interfaces for convinience not necessary, but it
> still be appealing if we want PurpleProtocolInterface to not be so huge.
I like the idea of small interfaces. But you should pick carefully, which
methods should stay in main class.
Also, I think there should still be some padding bytes, in case of any
unexpected upgrades, that should stay in the main class.
> > Is it possible to set the function pointers using a similar system as
> > have for the plugin information (with the key-value pairs), or does
> > good form in a gobject system?
> The key-value pairs are provided during instantiation of an object, not
> type. So, everytime when creating an object of XMPPProtocol (protocols
> unregistered and registered again and again by plugin reloads in case of
> third-party stuff), we would need to provide all the functions. And then
> creating an object of GTalkProtocol, we would again have to provide all
> functions to instantiate that protocol object.
> However, by using interfaces, we set the functions during the
> the type. So, when the XMPPProtocol type is initialized, its functions
> And if GTalkProtocol has to inherit XMPPProtocol, it has to set only those
> functions in the interface that are different from XMPPProtocol's
> since XMPPProtocol's type knows what it implements.
> Devel mailing list
> Devel at pidgin.im
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel