Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <plugin.h>
- #include <prpl.h>
- #include <debug.h>
- #include <version.h>
- #include <account.h>
- #define TESTP_PRPL_ID "prpl-testplugin"
- void testp_login(PurpleAccount* _pAccount)
- {
- }
- void testp_close(PurpleConnection* _pConnection)
- {
- }
- int testp_send_im(PurpleConnection* _pConnection, const char* _pWho, const char* _pMessage, PurpleMessageFlags _flags)
- {
- return 1;
- }
- const char* testp_normalize(const PurpleAccount* _pAccount, const char* _pWho)
- {
- return _pWho;
- }
- const char* testp_list_icon(PurpleAccount* _pAccount, PurpleBuddy* _pBuddy)
- {
- return "testp";
- }
- extern "C"
- {
- static PurplePluginProtocolInfo testp_protocol_info =
- {
- (PurpleProtocolOptions)0, /* options */
- NULL, /* user_splits */
- NULL, /* protocol_options */
- { /* icon_spec, a PurpleBuddyIconSpec */
- "png,gif,bmp,tiff,jpg", /* format */
- 1, /* min_width */
- 1, /* min_height */
- 4096, /* max_width */
- 4096, /* max_height */
- 8*1024*1024, /* max_filesize */
- PURPLE_ICON_SCALE_SEND, /* scale_rules */
- },
- testp_list_icon, /* list_icon */
- NULL, /* list_emblems */
- NULL, /* status_text */
- NULL, /* tooltip_text */
- NULL, /* status_types */
- NULL, /* blist_node_menu */
- NULL, /* chat_info */
- NULL, /* chat_info_defaults */
- testp_login, /* login */
- testp_close, /* close */
- testp_send_im, /* send_im */
- NULL, /* set_info */
- NULL, /* send_typing */
- NULL, /* get_info */
- NULL, /* set_status */
- NULL, /* set_idle */
- NULL, /* change_passwd */
- NULL, /* add_buddy */
- NULL, /* add_buddies */
- NULL, /* remove_buddy */
- NULL, /* remove_buddies */
- NULL, /* add_permit */
- NULL, /* add_deny */
- NULL, /* rem_permit */
- NULL, /* rem_deny */
- NULL, /* set_permit_deny */
- NULL, /* join_chat */
- NULL, /* reject chat invite */
- NULL, /* get_chat_name */
- NULL, /* chat_invite */
- NULL, /* chat_leave */
- NULL, /* chat_whisper */
- NULL, /* chat_send */
- NULL, /* keepalive */
- NULL, /* register_user */
- NULL, /* get_cb_info */
- NULL, /* get_cb_away */
- NULL, /* alias_buddy */
- NULL, /* group_buddy */
- NULL, /* rename_group */
- NULL, /* buddy_free */
- NULL, /* convo_closed */
- testp_normalize, /* normalize */
- NULL, /* set_buddy_icon */
- NULL, /* remove_group */
- NULL, /* get_cb_real_name */
- NULL, /* set_chat_topic */
- NULL, /* find_blist_chat */
- NULL, /* roomlist_get_list */
- NULL, /* roomlist_cancel */
- NULL, /* roomlist_expand_category */
- NULL, /* can_receive_file */
- NULL, /* send_file */
- NULL, /* new_xfer */
- NULL, /* offline_message */
- NULL, /* whiteboard_prpl_ops */
- NULL, /* send_raw */
- NULL, /* roomlist_room_serialize */
- NULL, /* unregister_user */
- NULL, /* send_attention */
- NULL, /* attention_types */
- sizeof(PurplePluginProtocolInfo), /* struct_size */
- NULL, /*campfire_get_account_text_table *//* get_account_text_table */
- NULL, /* initiate_media */
- NULL, /* get_media_caps */
- NULL, /* get_moods */
- NULL, /* set_public_alias */
- NULL, /* get_public_alias */
- NULL, /* add_buddy_with_invite */
- NULL, /* add_buddies_with_invite */
- };
- #define GPLUGIN_ID TESTP_PRPL_ID
- #define GPLUGIN_NAME "TestPlugin"
- #define GPLUGIN_VERSION "0.1"
- #define GPLUGIN_SUMMARY "TestPlugin"
- #define GPLUGIN_DESCRIPTION "Test Protocol Plugin"
- #define GPLUGIN_AUTHOR "My Name <email@helloworld.tld>"
- #define GPLUGIN_HOMEPAGE "http://example.com"
- static PurplePluginInfo info =
- {
- PURPLE_PLUGIN_MAGIC,
- PURPLE_MAJOR_VERSION,
- PURPLE_MINOR_VERSION,
- PURPLE_PLUGIN_PROTOCOL,
- NULL,
- 0,
- NULL,
- PURPLE_PRIORITY_DEFAULT,
- GPLUGIN_ID ,
- GPLUGIN_NAME ,
- GPLUGIN_VERSION ,
- GPLUGIN_SUMMARY ,
- GPLUGIN_DESCRIPTION,
- GPLUGIN_AUTHOR ,
- GPLUGIN_HOMEPAGE ,
- NULL,
- NULL,
- NULL,
- NULL,
- &testp_protocol_info,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
- };
- static void init_plugin(PurplePlugin* plugin)
- {
- }
- PURPLE_INIT_PLUGIN(testplugin, init_plugin, info)
- } // extern "C"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement