Trac is being migrated to new services! Issues can be found in our new YouTrack instance and WIKI pages can be found on our website.

Changes between Version 1 and Version 2 of CHowTo/RequestAPIHowTo


Ignore:
Timestamp:
Aug 6, 2007, 1:51:38 AM (17 years ago)
Author:
John Bailey
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CHowTo/RequestAPIHowTo

    v1 v2  
    11= Request API How-To =
    2 This page is a placeholder pending the completion of this document.
     2The Request API is a way by which libpurple plugins can request information or input from the user.  It is typically one of the harder areas of the API for first-time plugin authors to understand.  Here, by using plugin actions in conjunction with the Request API, we will try to demistify it.  We're going to create a new plugin in the process, too.
     3
     4== About the Request API ==
     5The request API is a fairly capable API provided within libpurple.  This API is particularly useful because it allows you to write a plugin that can be used by any libpurple UI which provides a UI implementation for the API without changing the plugin's source.  This means that a plugin using the request API will work with at least Pidgin and Finch, and possibly other libpurple applications.  It is for this reason that many plugins choose to remain libpurple plugins and use the Request API instead of becoming UI-specific plugins.
     6
     7== Writing the Example Plugin ==
     8This plugin will eventually be included as an example plugin in the libpurple source, but it is not part of Pidgin 2.0.2, which the rest of the How-To documents assume you are using. We are going to continue this assumption here. In fact, we're going to continue all the assumptions set forth in the [CHowTo/BasicPluginHowto Basic C Plugin How-To].
     9
     10Go back to ~/development/pidgin-2.0.2/libpurple/plugins and fire up your favorite editor on a new file called request-example.c. The contents of the file will be this:
     11
     12''This document is incomplete.  It has been saved to the wiki to ensure the current work is not lost.  It should be finished soon.''
     13
     14{{{
     15#!c
     16}}}
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!