| 59 #include "notify.h" |
59 #include "notify.h" |
| 60 #include "plugins.h" |
60 #include "plugins.h" |
| 61 #include "roomlist.h" |
61 #include "roomlist.h" |
| 62 #include "status.h" |
62 #include "status.h" |
| 63 #include "whiteboard.h" |
63 #include "whiteboard.h" |
| |
64 |
| |
65 /** |
| |
66 * Flags to indicate what base protocol's data a derived protocol wants to |
| |
67 * override. |
| |
68 * |
| |
69 * @see purple_protocol_override() |
| |
70 */ |
| |
71 typedef enum /*< flags >*/ |
| |
72 { |
| |
73 PURPLE_PROTOCOL_OVERRIDE_USER_SPLITS = 1 << 1, |
| |
74 PURPLE_PROTOCOL_OVERRIDE_PROTOCOL_OPTIONS = 1 << 2, |
| |
75 PURPLE_PROTOCOL_OVERRIDE_ICON_SPEC = 1 << 3, |
| |
76 } PurpleProtocolOverrideFlags; |
| 64 |
77 |
| 65 /** |
78 /** |
| 66 * Represents an instance of a protocol registered with the protocols |
79 * Represents an instance of a protocol registered with the protocols |
| 67 * subsystem. Protocols must initialize the members to appropriate values. |
80 * subsystem. Protocols must initialize the members to appropriate values. |
| 68 */ |
81 */ |
| 693 * |
706 * |
| 694 * @return The whiteboard ops of the protocol. |
707 * @return The whiteboard ops of the protocol. |
| 695 */ |
708 */ |
| 696 PurpleWhiteboardOps *purple_protocol_get_whiteboard_ops(const PurpleProtocol *protocol); |
709 PurpleWhiteboardOps *purple_protocol_get_whiteboard_ops(const PurpleProtocol *protocol); |
| 697 |
710 |
| |
711 /** |
| |
712 * Lets derived protocol types override the base type's instance data, such as |
| |
713 * protocol options, user splits, icon spec, etc. |
| |
714 * This function is called in the *_init() function of your derived protocol, |
| |
715 * to delete the parent type's data so you can define your own. |
| |
716 * |
| |
717 * @param protocol The protocol instance. |
| |
718 * @param flags What instance data to delete. |
| |
719 */ |
| |
720 void purple_protocol_override(PurpleProtocol *protocol, |
| |
721 PurpleProtocolOverrideFlags flags); |
| |
722 |
| 698 /*@}*/ |
723 /*@}*/ |
| 699 |
724 |
| 700 /**************************************************************************/ |
725 /**************************************************************************/ |
| 701 /** @name Protocol Interface API */ |
726 /** @name Protocol Interface API */ |
| 702 /**************************************************************************/ |
727 /**************************************************************************/ |