Changes between Version 9 and Version 10 of WhatIsLibpurple


Ignore:
Timestamp:
10/12/07 13:41:35 (12 years ago)
Author:
sorakiu
Comment:

few spelling errors fixed

Legend:

Unmodified
Added
Removed
Modified
  • WhatIsLibpurple

    v9 v10  
    77You write a program in C or C++ that provides all the fancy windows and dialogs and anything that the user interacts with.  Your program uses our libpurple library to connect to the IM networks, manage accounts and preferences, and lots of other helpful little things.
    88
    9 Your program registers a bunch of callback functions, called "UI ops," with libpurple.  This is done by populating the appropriate uiops structures (eg. !PurpleAccountUiOps, !PurpleBlistUiOps, etc.) and making them available to the libpurple core (by calling purple_account_set_ui_ops, purple_blist_set_ui_ops, etc.).  Thes ui ops are triggered by specific events.  For example, the buddylist ui ops are used to update your buddylist window when a new buddy is added, or if a buddy goes away, or becomes idle, etc.  The same thing happens for conversations, logging etc.
     9Your program registers a bunch of callback functions, called "UI ops," with libpurple.  This is done by populating the appropriate uiops structures (eg. !PurpleAccountUiOps, !PurpleBlistUiOps, etc.) and making them available to the libpurple core (by calling purple_account_set_ui_ops, purple_blist_set_ui_ops, etc.).  These ui ops are triggered by specific events.  For example, the buddylist ui ops are used to update your buddylist window when a new buddy is added, or if a buddy goes away, or becomes idle, etc.  The same thing happens for conversations, logging etc.
    1010
    1111While the uiops are sufficient for most of the ui operations, it's likely that you will want to use various libpurple signals, as well.
     
    1919libpurple is ''not'' threadsafe.  It should be accessed by an implementing UI only one thread ''ever'' (that is, do not attempt to use synchronization or locks to access it from multiple threads).   Plugins can use multiple threads, but they must always call libpurple functions and callbacks on the thread on which they were initialized (typically the main thread of the program).
    2020
    21 libpurple's run loop access occurs through eventloop.c; the UI must implement the UI Ops defined there and register them in order to watch sockets for new data and call timeout functions after a specified delay.  For example, Pidgin uses the glib run loop, and Adium uses the Cocoa event run lop.
     21libpurple's run loop access occurs through eventloop.c; the UI must implement the UI Ops defined there and register them in order to watch sockets for new data and call timeout functions after a specified delay.  For example, Pidgin uses the glib run loop, and Adium uses the Cocoa event run loop.
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!