2 * @file prpl.h Protocol Plugin functions
8 * Purple is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
27 /* this file should be all that prpls need to include. therefore, by including
28 * this file, they should get glib, proxy, purple_connection, prpl, etc. */
30 #ifndef _PURPLE_PRPL_H_
31 #define _PURPLE_PRPL_H_
33 typedef struct _PurplePluginProtocolInfo PurplePluginProtocolInfo;
34 /** @copydoc _PurpleAttentionType */
35 typedef struct _PurpleAttentionType PurpleAttentionType;
37 /**************************************************************************/
38 /** @name Basic Protocol Information */
39 /**************************************************************************/
42 PURPLE_ICON_SCALE_DISPLAY = 0x01, /**< We scale the icon when we display it */
43 PURPLE_ICON_SCALE_SEND = 0x02 /**< We scale the icon before we send it to the server */
44 } PurpleIconScaleRules;
48 * A description of a Buddy Icon specification. This tells Purple what kind of image file
49 * it should give this prpl, and what kind of image file it should expect back.
50 * Dimensions less than 1 should be ignored and the image not scaled.
52 typedef struct _PurpleBuddyIconSpec PurpleBuddyIconSpec;
55 * This \#define exists just to make it easier to fill out the buddy icon
56 * field in the prpl info struct for protocols that couldn't care less.
58 #define NO_BUDDY_ICONS {NULL, 0, 0, 0, 0, 0, 0}
65 #include "conversation.h"
74 #include "whiteboard.h"
77 /** @copydoc PurpleBuddyIconSpec */
78 struct _PurpleBuddyIconSpec {
79 /** This is a comma-delimited list of image formats or @c NULL if icons
80 * are not supported. Neither the core nor the prpl will actually
81 * check to see if the data it's given matches this; it's entirely up
82 * to the UI to do what it wants
86 int min_width; /**< Minimum width of this icon */
87 int min_height; /**< Minimum height of this icon */
88 int max_width; /**< Maximum width of this icon */
89 int max_height; /**< Maximum height of this icon */
90 size_t max_filesize; /**< Maximum size in bytes */
91 PurpleIconScaleRules scale_rules; /**< How to stretch this icon */
94 struct proto_chat_entry {
96 const char *identifier;
104 /** Represents "nudges" and "buzzes" that you may send to a buddy to attract
105 * their attention (or vice-versa).
107 struct _PurpleAttentionType
109 const char *name; /**< Shown in GUI elements */
110 const char *incoming_description; /**< Shown when sent */
111 const char *outgoing_description; /**< Shown when receied */
112 const char *icon_name; /**< Icon to display (optional) */
113 const char *unlocalized_name; /**< Unlocalized name for UIs needing it */
115 /* Reserved fields for future purposes */
124 * These should all be stuff that some plugins can do and others can't.
129 * User names are unique to a chat and are not shared between rooms.
131 * XMPP lets you choose what name you want in chats, so it shouldn't
132 * be pulling the aliases from the buddy list for the chat list;
135 OPT_PROTO_UNIQUE_CHATNAME = 0x00000004,
138 * Chat rooms have topics.
140 * IRC and XMPP support this.
142 OPT_PROTO_CHAT_TOPIC = 0x00000008,
145 * Don't require passwords for sign-in.
147 * Zephyr doesn't require passwords, so there's no
148 * need for a password prompt.
150 OPT_PROTO_NO_PASSWORD = 0x00000010,
153 * Notify on new mail.
155 * MSN and Yahoo notify you when you have new mail.
157 OPT_PROTO_MAIL_CHECK = 0x00000020,
162 * Oscar lets you send images in direct IMs.
164 OPT_PROTO_IM_IMAGE = 0x00000040,
167 * Allow passwords to be optional.
169 * Passwords in IRC are optional, and are needed for certain
172 OPT_PROTO_PASSWORD_OPTIONAL = 0x00000080,
175 * Allows font size to be specified in sane point size
177 * Probably just XMPP and Y!M
179 OPT_PROTO_USE_POINTSIZE = 0x00000100,
182 * Set the Register button active even when the username has not
185 * Gadu-Gadu doesn't need a username to register new account (because
186 * usernames are assigned by the server).
188 OPT_PROTO_REGISTER_NOSCREENNAME = 0x00000200,
191 * Indicates that slash commands are native to this protocol.
192 * Used as a hint that unknown commands should not be sent as messages.
195 OPT_PROTO_SLASH_COMMANDS_NATIVE = 0x00000400
197 } PurpleProtocolOptions;
200 * A protocol plugin information structure.
202 * Every protocol plugin initializes this structure. It is the gateway
203 * between purple and the protocol plugin. Many of these callbacks can be
204 * NULL. If a callback must be implemented, it has a comment indicating so.
206 struct _PurplePluginProtocolInfo
208 PurpleProtocolOptions options; /**< Protocol options. */
210 GList *user_splits; /**< A GList of PurpleAccountUserSplit */
211 GList *protocol_options; /**< A GList of PurpleAccountOption */
213 PurpleBuddyIconSpec icon_spec; /**< The icon spec. */
216 * Returns the base icon name for the given buddy and account.
217 * If buddy is NULL and the account is non-NULL, it will return the
218 * name to use for the account's icon. If both are NULL, it will
219 * return the name to use for the protocol's icon.
221 * This must be implemented.
223 const char *(*list_icon)(PurpleAccount *account, PurpleBuddy *buddy);
226 * Fills the four char**'s with string identifiers for "emblems"
227 * that the UI will interpret and display as relevant
229 const char *(*list_emblem)(PurpleBuddy *buddy);
232 * Gets a short string representing this buddy's status. This will
233 * be shown on the buddy list.
235 char *(*status_text)(PurpleBuddy *buddy);
238 * Allows the prpl to add text to a buddy's tooltip.
240 void (*tooltip_text)(PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, gboolean full);
243 * Returns a list of #PurpleStatusType which exist for this account;
244 * this must be implemented, and must add at least the offline and
247 GList *(*status_types)(PurpleAccount *account);
250 * Returns a list of #PurpleMenuAction structs, which represent extra
251 * actions to be shown in (for example) the right-click menu for @a
254 GList *(*blist_node_menu)(PurpleBlistNode *node);
255 GList *(*chat_info)(PurpleConnection *);
256 GHashTable *(*chat_info_defaults)(PurpleConnection *, const char *chat_name);
258 /* All the server-related functions */
260 /** This must be implemented. */
261 void (*login)(PurpleAccount *);
263 /** This must be implemented. */
264 void (*close)(PurpleConnection *);
267 * This PRPL function should return a positive value on success.
268 * If the message is too big to be sent, return -E2BIG. If
269 * the account is not connected, return -ENOTCONN. If the
270 * PRPL is unable to send the message for another reason, return
271 * some other negative value. You can use one of the valid
272 * errno values, or just big something. If the message should
273 * not be echoed to the conversation window, return 0.
275 int (*send_im)(PurpleConnection *, const char *who,
277 PurpleMessageFlags flags);
279 void (*set_info)(PurpleConnection *, const char *info);
282 * @return If this protocol requires the PURPLE_TYPING message to
283 * be sent repeatedly to signify that the user is still
284 * typing, then the PRPL should return the number of
285 * seconds to wait before sending a subsequent notification.
286 * Otherwise the PRPL should return 0.
288 unsigned int (*send_typing)(PurpleConnection *, const char *name, PurpleTypingState state);
291 * Should arrange for purple_notify_userinfo() to be called with
292 * @a who's user info.
294 void (*get_info)(PurpleConnection *, const char *who);
295 void (*set_status)(PurpleAccount *account, PurpleStatus *status);
297 void (*set_idle)(PurpleConnection *, int idletime);
298 void (*change_passwd)(PurpleConnection *, const char *old_pass,
299 const char *new_pass);
301 * Add a buddy to a group on the server.
303 * This PRPL function may be called in situations in which the buddy is
304 * already in the specified group. If the protocol supports
305 * authorization and the user is not already authorized to see the
306 * status of \a buddy, \a add_buddy should request authorization.
308 void (*add_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group);
309 void (*add_buddies)(PurpleConnection *, GList *buddies, GList *groups);
310 void (*remove_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group);
311 void (*remove_buddies)(PurpleConnection *, GList *buddies, GList *groups);
312 void (*add_permit)(PurpleConnection *, const char *name);
313 void (*add_deny)(PurpleConnection *, const char *name);
314 void (*rem_permit)(PurpleConnection *, const char *name);
315 void (*rem_deny)(PurpleConnection *, const char *name);
316 void (*set_permit_deny)(PurpleConnection *);
317 void (*join_chat)(PurpleConnection *, GHashTable *components);
318 void (*reject_chat)(PurpleConnection *, GHashTable *components);
319 char *(*get_chat_name)(GHashTable *components);
320 void (*chat_invite)(PurpleConnection *, int id,
321 const char *message, const char *who);
322 void (*chat_leave)(PurpleConnection *, int id);
323 void (*chat_whisper)(PurpleConnection *, int id,
324 const char *who, const char *message);
325 int (*chat_send)(PurpleConnection *, int id, const char *message, PurpleMessageFlags flags);
327 /** If implemented, this will be called regularly for this prpl's
328 * active connections. You'd want to do this if you need to repeatedly
329 * send some kind of keepalive packet to the server to avoid being
330 * disconnected. ("Regularly" is defined by
331 * <code>KEEPALIVE_INTERVAL</code> in <tt>libpurple/connection.c</tt>.)
333 void (*keepalive)(PurpleConnection *);
335 /** new user registration */
336 void (*register_user)(PurpleAccount *);
339 * @deprecated Use #PurplePluginProtocolInfo.get_info instead.
341 void (*get_cb_info)(PurpleConnection *, int, const char *who);
343 * @deprecated Use #PurplePluginProtocolInfo.get_cb_real_name and
344 * #PurplePluginProtocolInfo.status_text instead.
346 void (*get_cb_away)(PurpleConnection *, int, const char *who);
348 /** save/store buddy's alias on server list/roster */
349 void (*alias_buddy)(PurpleConnection *, const char *who,
352 /** change a buddy's group on a server list/roster */
353 void (*group_buddy)(PurpleConnection *, const char *who,
354 const char *old_group, const char *new_group);
356 /** rename a group on a server list/roster */
357 void (*rename_group)(PurpleConnection *, const char *old_name,
358 PurpleGroup *group, GList *moved_buddies);
360 void (*buddy_free)(PurpleBuddy *);
362 void (*convo_closed)(PurpleConnection *, const char *who);
365 * Convert the username @a who to its canonical form. (For example,
366 * AIM treats "fOo BaR" and "foobar" as the same user; this function
367 * should return the same normalized string for both of those.)
369 const char *(*normalize)(const PurpleAccount *, const char *who);
372 * Set the buddy icon for the given connection to @a img. The prpl
373 * does NOT own a reference to @a img; if it needs one, it must
374 * #purple_imgstore_ref(@a img) itself.
376 void (*set_buddy_icon)(PurpleConnection *, PurpleStoredImage *img);
378 void (*remove_group)(PurpleConnection *gc, PurpleGroup *group);
380 /** Gets the real name of a participant in a chat. For example, on
381 * XMPP this turns a chat room nick <tt>foo</tt> into
382 * <tt>room\@server/foo</tt>
383 * @param gc the connection on which the room is.
384 * @param id the ID of the chat room.
385 * @param who the nickname of the chat participant.
386 * @return the real name of the participant. This string must be
387 * freed by the caller.
389 char *(*get_cb_real_name)(PurpleConnection *gc, int id, const char *who);
391 void (*set_chat_topic)(PurpleConnection *gc, int id, const char *topic);
393 PurpleChat *(*find_blist_chat)(PurpleAccount *account, const char *name);
395 /* room listing prpl callbacks */
396 PurpleRoomlist *(*roomlist_get_list)(PurpleConnection *gc);
397 void (*roomlist_cancel)(PurpleRoomlist *list);
398 void (*roomlist_expand_category)(PurpleRoomlist *list, PurpleRoomlistRoom *category);
400 /* file transfer callbacks */
401 gboolean (*can_receive_file)(PurpleConnection *, const char *who);
402 void (*send_file)(PurpleConnection *, const char *who, const char *filename);
403 PurpleXfer *(*new_xfer)(PurpleConnection *, const char *who);
405 /** Checks whether offline messages to @a buddy are supported.
406 * @return @c TRUE if @a buddy can be sent messages while they are
407 * offline, or @c FALSE if not.
409 gboolean (*offline_message)(const PurpleBuddy *buddy);
411 PurpleWhiteboardPrplOps *whiteboard_prpl_ops;
413 /** For use in plugins that may understand the underlying protocol */
414 int (*send_raw)(PurpleConnection *gc, const char *buf, int len);
416 /* room list serialize */
417 char *(*roomlist_room_serialize)(PurpleRoomlistRoom *room);
419 /** Remove the user from the server. The account can either be
420 * connected or disconnected. After the removal is finished, the
421 * connection will stay open and has to be closed!
423 /* This is here rather than next to register_user for API compatibility
426 void (*unregister_user)(PurpleAccount *, PurpleAccountUnregistrationCb cb, void *user_data);
428 /* Attention API for sending & receiving zaps/nudges/buzzes etc. */
429 gboolean (*send_attention)(PurpleConnection *gc, const char *username, guint type);
430 GList *(*get_attention_types)(PurpleAccount *acct);
433 * The size of the PurplePluginProtocolInfo. This should always be sizeof(PurplePluginProtocolInfo).
434 * This allows adding more functions to this struct without requiring a major version bump.
436 unsigned long struct_size;
439 * If more functions are added, they should accessed using the following syntax:
441 * if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, new_function))
442 * prpl->new_function(...);
446 * if (prpl->new_function != NULL)
447 * prpl->new_function(...);
449 * The PURPLE_PROTOCOL_PLUGIN_HAS_FUNC macro can be used for the older member
450 * functions (e.g. login, send_im etc.) too.
453 /** This allows protocols to specify additional strings to be used for
454 * various purposes. The idea is to stuff a bunch of strings in this hash
455 * table instead of expanding the struct for every addition. This hash
456 * table is allocated every call and MUST be unrefed by the caller.
458 * @param account The account to specify. This can be NULL.
459 * @return The protocol's string hash table. The hash table should be
460 * destroyed by the caller when it's no longer needed.
462 GHashTable *(*get_account_text_table)(PurpleAccount *account);
465 * Initiate a media session with the given contact.
467 * @param account The account to initiate the media session on.
468 * @param who The remote user to initiate the session with.
469 * @param type The type of media session to initiate.
470 * @return TRUE if the call succeeded else FALSE. (Doesn't imply the media session or stream will be successfully created)
472 gboolean (*initiate_media)(PurpleAccount *account, const char *who,
473 PurpleMediaSessionType type);
476 * Checks to see if the given contact supports the given type of media session.
478 * @param account The account the contact is on.
479 * @param who The remote user to check for media capability with.
480 * @return The media caps the contact supports.
482 PurpleMediaCaps (*get_media_caps)(PurpleAccount *account,
486 #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \
487 (((G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < G_STRUCT_OFFSET(PurplePluginProtocolInfo, struct_size)) \
488 || (G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < prpl->struct_size)) && \
489 prpl->member != NULL)
492 #define PURPLE_IS_PROTOCOL_PLUGIN(plugin) \
493 ((plugin)->info->type == PURPLE_PLUGIN_PROTOCOL)
495 #define PURPLE_PLUGIN_PROTOCOL_INFO(plugin) \
496 ((PurplePluginProtocolInfo *)(plugin)->info->extra_info)
502 /**************************************************************************/
503 /** @name Attention Type API */
504 /**************************************************************************/
508 * Creates a new #PurpleAttentionType object and sets its mandatory parameters.
510 * @param ulname A non-localized string that can be used by UIs in need of such
511 * non-localized strings. This should be the same as @a name,
512 * without localization.
513 * @param name A localized string that the UI may display for the event. This
514 * should be the same string as @a ulname, with localization.
515 * @param inc_desc A localized description shown when the event is received.
516 * @param out_desc A localized description shown when the event is sent.
517 * @return A pointer to the new object.
520 PurpleAttentionType *purple_attention_type_new(const char *ulname, const char *name,
521 const char *inc_desc, const char *out_desc);
524 * Sets the displayed name of the attention-demanding event.
526 * @param type The attention type.
527 * @param name The localized name that will be displayed by UIs. This should be
528 * the same string given as the unlocalized name, but with
532 void purple_attention_type_set_name(PurpleAttentionType *type, const char *name);
535 * Sets the description of the attention-demanding event shown in conversations
536 * when the event is received.
538 * @param type The attention type.
539 * @param desc The localized description for incoming events.
542 void purple_attention_type_set_incoming_desc(PurpleAttentionType *type, const char *desc);
545 * Sets the description of the attention-demanding event shown in conversations
546 * when the event is sent.
548 * @param type The attention type.
549 * @param desc The localized description for outgoing events.
552 void purple_attention_type_set_outgoing_desc(PurpleAttentionType *type, const char *desc);
555 * Sets the name of the icon to display for the attention event; this is optional.
557 * @param type The attention type.
558 * @param name The icon's name.
559 * @note Icons are optional for attention events.
562 void purple_attention_type_set_icon_name(PurpleAttentionType *type, const char *name);
565 * Sets the unlocalized name of the attention event; some UIs may need this,
566 * thus it is required.
568 * @param type The attention type.
569 * @param ulname The unlocalized name. This should be the same string given as
570 * the localized name, but without localization.
573 void purple_attention_type_set_unlocalized_name(PurpleAttentionType *type, const char *ulname);
576 * Get the attention type's name as displayed by the UI.
578 * @param type The attention type.
582 const char *purple_attention_type_get_name(const PurpleAttentionType *type);
585 * Get the attention type's description shown when the event is received.
587 * @param type The attention type.
588 * @return The description.
591 const char *purple_attention_type_get_incoming_desc(const PurpleAttentionType *type);
594 * Get the attention type's description shown when the event is sent.
596 * @param type The attention type.
597 * @return The description.
600 const char *purple_attention_type_get_outgoing_desc(const PurpleAttentionType *type);
603 * Get the attention type's icon name.
605 * @param type The attention type.
606 * @return The icon name or @c NULL if unset/empty.
607 * @note Icons are optional for attention events.
610 const char *purple_attention_type_get_icon_name(const PurpleAttentionType *type);
613 * Get the attention type's unlocalized name; this is useful for some UIs.
615 * @param type The attention type
616 * @return The unlocalized name.
619 const char *purple_attention_type_get_unlocalized_name(const PurpleAttentionType *type);
623 /**************************************************************************/
624 /** @name Protocol Plugin API */
625 /**************************************************************************/
629 * Notifies Purple that our account's idle state and time have changed.
631 * This is meant to be called from protocol plugins.
633 * @param account The account.
634 * @param idle The user's idle state.
635 * @param idle_time The user's idle time.
637 void purple_prpl_got_account_idle(PurpleAccount *account, gboolean idle,
641 * Notifies Purple of our account's log-in time.
643 * This is meant to be called from protocol plugins.
645 * @param account The account the user is on.
646 * @param login_time The user's log-in time.
648 void purple_prpl_got_account_login_time(PurpleAccount *account, time_t login_time);
651 * Notifies Purple that our account's status has changed.
653 * This is meant to be called from protocol plugins.
655 * @param account The account the user is on.
656 * @param status_id The status ID.
657 * @param ... A NULL-terminated list of attribute IDs and values,
658 * beginning with the value for @a attr_id.
660 void purple_prpl_got_account_status(PurpleAccount *account,
661 const char *status_id, ...) G_GNUC_NULL_TERMINATED;
664 * Notifies Purple that our account's actions have changed. This is only
665 * called after the initial connection. Emits the account-actions-changed
668 * This is meant to be called from protocol plugins.
670 * @param account The account.
672 * @see account-actions-changed
675 void purple_prpl_got_account_actions(PurpleAccount *account);
678 * Notifies Purple that a buddy's idle state and time have changed.
680 * This is meant to be called from protocol plugins.
682 * @param account The account the user is on.
683 * @param name The name of the buddy.
684 * @param idle The user's idle state.
685 * @param idle_time The user's idle time. This is the time at
686 * which the user became idle, in seconds since
687 * the epoch. If the PRPL does not know this value
688 * then it should pass 0.
690 void purple_prpl_got_user_idle(PurpleAccount *account, const char *name,
691 gboolean idle, time_t idle_time);
694 * Notifies Purple of a buddy's log-in time.
696 * This is meant to be called from protocol plugins.
698 * @param account The account the user is on.
699 * @param name The name of the buddy.
700 * @param login_time The user's log-in time.
702 void purple_prpl_got_user_login_time(PurpleAccount *account, const char *name,
706 * Notifies Purple that a buddy's status has been activated.
708 * This is meant to be called from protocol plugins.
710 * @param account The account the user is on.
711 * @param name The name of the buddy.
712 * @param status_id The status ID.
713 * @param ... A NULL-terminated list of attribute IDs and values,
714 * beginning with the value for @a attr_id.
716 void purple_prpl_got_user_status(PurpleAccount *account, const char *name,
717 const char *status_id, ...) G_GNUC_NULL_TERMINATED;
720 * Notifies libpurple that a buddy's status has been deactivated
722 * This is meant to be called from protocol plugins.
724 * @param account The account the user is on.
725 * @param name The name of the buddy.
726 * @param status_id The status ID.
728 void purple_prpl_got_user_status_deactive(PurpleAccount *account, const char *name,
729 const char *status_id);
732 * Informs the server that our account's status changed.
734 * @param account The account the user is on.
735 * @param old_status The previous status.
736 * @param new_status The status that was activated, or deactivated
737 * (in the case of independent statuses).
739 void purple_prpl_change_account_status(PurpleAccount *account,
740 PurpleStatus *old_status,
741 PurpleStatus *new_status);
744 * Retrieves the list of stock status types from a prpl.
746 * @param account The account the user is on.
747 * @param presence The presence for which we're going to get statuses
749 * @return List of statuses
751 GList *purple_prpl_get_statuses(PurpleAccount *account, PurplePresence *presence);
754 * Send an attention request message.
756 * @param gc The connection to send the message on.
757 * @param who Whose attention to request.
758 * @param type_code An index into the prpl's attention_types list determining the type
759 * of the attention request command to send. 0 if prpl only defines one
760 * (for example, Yahoo and MSN), but some protocols define more (MySpaceIM).
762 * Note that you can't send arbitrary PurpleAttentionType's, because there is
763 * only a fixed set of attention commands.
767 void purple_prpl_send_attention(PurpleConnection *gc, const char *who, guint type_code);
770 * Process an incoming attention message.
772 * @param gc The connection that received the attention message.
773 * @param who Who requested your attention.
774 * @param type_code An index into the prpl's attention_types list determining the type
775 * of the attention request command to send.
779 void purple_prpl_got_attention(PurpleConnection *gc, const char *who, guint type_code);
782 * Process an incoming attention message in a chat.
784 * @param gc The connection that received the attention message.
785 * @param id The chat id.
786 * @param who Who requested your attention.
787 * @param type_code An index into the prpl's attention_types list determining the type
788 * of the attention request command to send.
792 void purple_prpl_got_attention_in_chat(PurpleConnection *gc, int id, const char *who, guint type_code);
795 * Determines if the contact supports the given media session type.
797 * @param account The account the user is on.
798 * @param who The name of the contact to check capabilities for.
800 * @return The media caps the contact supports.
802 PurpleMediaCaps purple_prpl_get_media_caps(PurpleAccount *account,
806 * Initiates a media session with the given contact.
808 * @param account The account the user is on.
809 * @param who The name of the contact to start a session with.
810 * @param type The type of media session to start.
812 * @return TRUE if the call succeeded else FALSE. (Doesn't imply the media session or stream will be successfully created)
814 gboolean purple_prpl_initiate_media(PurpleAccount *account,
816 PurpleMediaSessionType type);
820 /**************************************************************************/
821 /** @name Protocol Plugin Subsystem API */
822 /**************************************************************************/
826 * Finds a protocol plugin structure of the specified type.
828 * @param id The protocol plugin;
830 PurplePlugin *purple_find_prpl(const char *id);
838 #endif /* _PRPL_H_ */