| 592 |
592 |
| 593 #define PURPLE_IS_PROTOCOL_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_PROTOCOL_MEDIA)) |
593 #define PURPLE_IS_PROTOCOL_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_PROTOCOL_MEDIA)) |
| 594 #define PURPLE_PROTOCOL_MEDIA_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), PURPLE_TYPE_PROTOCOL_MEDIA, \ |
594 #define PURPLE_PROTOCOL_MEDIA_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), PURPLE_TYPE_PROTOCOL_MEDIA, \ |
| 595 PurpleProtocolMediaInterface)) |
595 PurpleProtocolMediaInterface)) |
| 596 |
596 |
| 597 #define PURPLE_TYPE_PROTOCOL_FACTORY (purple_protocol_factory_iface_get_type()) |
|
| 598 |
|
| 599 typedef struct _PurpleProtocolFactoryInterface PurpleProtocolFactoryInterface; |
|
| 600 |
|
| 601 /** |
|
| 602 * PurpleProtocolFactoryInterface: |
|
| 603 * @connection_new: Creates a new protocol-specific connection object that |
|
| 604 * inherits #PurpleConnection. |
|
| 605 * @roomlist_new: Creates a new protocol-specific room list object that |
|
| 606 * inherits #PurpleRoomlist. |
|
| 607 * @whiteboard_new: Creates a new protocol-specific whiteboard object that |
|
| 608 * inherits #PurpleWhiteboard. |
|
| 609 * |
|
| 610 * The protocol factory interface. |
|
| 611 * |
|
| 612 * This interface provides callbacks for construction of protocol-specific |
|
| 613 * subclasses of some purple objects. |
|
| 614 */ |
|
| 615 struct _PurpleProtocolFactoryInterface |
|
| 616 { |
|
| 617 /*< private >*/ |
|
| 618 GTypeInterface parent_iface; |
|
| 619 |
|
| 620 /*< public >*/ |
|
| 621 PurpleConnection *(*connection_new)(PurpleProtocol *protocol, |
|
| 622 PurpleAccount *account, |
|
| 623 const char *password); |
|
| 624 |
|
| 625 PurpleRoomlist *(*roomlist_new)(PurpleAccount *account); |
|
| 626 |
|
| 627 PurpleWhiteboard *(*whiteboard_new)(PurpleAccount *account, |
|
| 628 const char *who, int state); |
|
| 629 }; |
|
| 630 |
|
| 631 #define PURPLE_IS_PROTOCOL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_PROTOCOL_FACTORY)) |
|
| 632 #define PURPLE_PROTOCOL_FACTORY_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), PURPLE_TYPE_PROTOCOL_FACTORY, \ |
|
| 633 PurpleProtocolFactoryInterface)) |
|
| 634 |
|
| 635 /** |
597 /** |
| 636 * PURPLE_PROTOCOL_IMPLEMENTS: |
598 * PURPLE_PROTOCOL_IMPLEMENTS: |
| 637 * @protocol: The protocol in which to check |
599 * @protocol: The protocol in which to check |
| 638 * @IFACE: The interface name in caps. e.g. <literal>CLIENT</literal> |
600 * @IFACE: The interface name in caps. e.g. <literal>CLIENT</literal> |
| 639 * @func: The function to check |
601 * @func: The function to check |
| 1257 * Since: 3.0.0 |
1219 * Since: 3.0.0 |
| 1258 */ |
1220 */ |
| 1259 gboolean purple_protocol_media_iface_send_dtmf(PurpleProtocol *protocol, |
1221 gboolean purple_protocol_media_iface_send_dtmf(PurpleProtocol *protocol, |
| 1260 PurpleMedia *media, gchar dtmf, guint8 volume, guint8 duration); |
1222 PurpleMedia *media, gchar dtmf, guint8 volume, guint8 duration); |
| 1261 |
1223 |
| 1262 /**************************************************************************/ |
|
| 1263 /* Protocol Factory Interface API */ |
|
| 1264 /**************************************************************************/ |
|
| 1265 |
|
| 1266 /** |
|
| 1267 * purple_protocol_factory_iface_get_type: |
|
| 1268 * |
|
| 1269 * Returns: The #GType for the protocol factory interface. |
|
| 1270 */ |
|
| 1271 GType purple_protocol_factory_iface_get_type(void); |
|
| 1272 |
|
| 1273 /** |
|
| 1274 * purple_protocol_factory_iface_connection_new: (skip) |
|
| 1275 */ |
|
| 1276 PurpleConnection *purple_protocol_factory_iface_connection_new(PurpleProtocol *protocol, |
|
| 1277 PurpleAccount *account, const char *password); |
|
| 1278 |
|
| 1279 /** |
|
| 1280 * purple_protocol_factory_iface_roomlist_new: (skip) |
|
| 1281 */ |
|
| 1282 PurpleRoomlist *purple_protocol_factory_iface_roomlist_new(PurpleProtocol *protocol, |
|
| 1283 PurpleAccount *account); |
|
| 1284 |
|
| 1285 /** |
|
| 1286 * purple_protocol_factory_iface_whiteboard_new: (skip) |
|
| 1287 */ |
|
| 1288 PurpleWhiteboard *purple_protocol_factory_iface_whiteboard_new(PurpleProtocol *protocol, |
|
| 1289 PurpleAccount *account, const char *who, int state); |
|
| 1290 |
|
| 1291 G_END_DECLS |
1224 G_END_DECLS |
| 1292 |
1225 |
| 1293 #endif /* PURPLE_PROTOCOL_H */ |
1226 #endif /* PURPLE_PROTOCOL_H */ |