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 7 and Version 8 of DbusHowto


Ignore:
Timestamp:
Nov 3, 2013, 3:12:42 AM (10 years ago)
Author:
MarkDoliner
Comment:

Make inter-wiki links relative (and especially don't link to http, since we always redirect http to https).

Legend:

Unmodified
Added
Removed
Modified
  • DbusHowto

    v7 v8  
    2727[Note that the signal is called "received-im-msg" in the Pidgin documentation but the D-Bus signal is called "!ReceivedImMsg"; do this simple transformation for all signals you see.]
    2828
    29 This registers a function, called `my_func`, which will be called when the signal is emitted. Now you look up the documentation to see what parameters come with the signal, and you define `my_func` to work on those parameters. In this case, the [http://developer.pidgin.im/doxygen/dev2.x.y/html/conversation-signals.html#received-im-msg documentation] tells you that the parameters are (account, sender, message, conversation, flags), so you define `my_func` accordingly:
     29This registers a function, called `my_func`, which will be called when the signal is emitted. Now you look up the documentation to see what parameters come with the signal, and you define `my_func` to work on those parameters. In this case, the [/doxygen/dev2.x.y/html/conversation-signals.html#received-im-msg documentation] tells you that the parameters are (account, sender, message, conversation, flags), so you define `my_func` accordingly:
    3030{{{
    3131#!python
     
    6161But you get the idea.
    6262
    63 Here's a sample list of signals you can receive. For the full list, look in pages named "Signals" in the [http://developer.pidgin.im/doxygen/dev2.x.y/html/pages.html list of documentation pages].
    64 
    65  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/account-signals.html Account signals]:
     63Here's a sample list of signals you can receive. For the full list, look in pages named "Signals" in the [/doxygen/dev2.x.y/html/pages.html list of documentation pages].
     64
     65 * [/doxygen/dev2.x.y/html/account-signals.html Account signals]:
    6666    * account-status-changed, account-connecting, account-error-changed, account-authorization-requested
    67  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/blist-signals.html Buddy list signals]:
     67 * [/doxygen/dev2.x.y/html/blist-signals.html Buddy list signals]:
    6868    * buddy-status-changed, buddy-idle-changed, buddy-signed-on, buddy-signed-off, buddy-icon-changed
    69  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/connection-signals.html Connection signals]:
     69 * [/doxygen/dev2.x.y/html/connection-signals.html Connection signals]:
    7070    * signing-on, signed-on, signing-off, signed-off, connection-error
    71  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/conversation-signals.html Conversation signals]:
     71 * [/doxygen/dev2.x.y/html/conversation-signals.html Conversation signals]:
    7272    * These are emitted for events related to conversations you are having. Note that in Pidgin, "im" means a conversation with one person, and "chat" means a conversation with several people.
    7373    *  writing-im-msg, wrote-im-msg,
     
    8585    *  conversation-created, conversation-updated, deleting-conversation,
    8686    *  conversation-extended-menu
    87  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/core-signals.html Core signals]:
     87 * [/doxygen/dev2.x.y/html/core-signals.html Core signals]:
    8888    * quitting
    89  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/gtkconv-signals.html GtkConv signals]:
     89 * [/doxygen/dev2.x.y/html/gtkconv-signals.html GtkConv signals]:
    9090    *  displaying-im-msg, displayed-im-msg,
    9191    *  displaying-chat-msg, displayed-chat-msg,
    9292    *  conversation-switched,
    9393    *  conversation-hiding, conversation-displayed
    94  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/gtkimhtml-signals.html GtkIMHTML signals]:
     94 * [/doxygen/dev2.x.y/html/gtkimhtml-signals.html GtkIMHTML signals]:
    9595    * GtkIMHTML is the widget used for the input area in Pidgin
    9696    * url_clicked, format_buttons_update, format_function_clear, format_function_toggle, format_function_update
    97  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/notify-signals.html Notification signals]:
     97 * [/doxygen/dev2.x.y/html/notify-signals.html Notification signals]:
    9898    * displaying-userinfo, displaying-email-notification, displaying-emails-notification
    99  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/plugin-signals.html Plugin signals]:
     99 * [/doxygen/dev2.x.y/html/plugin-signals.html Plugin signals]:
    100100    * plugin-load, plugin-unload
    101  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/savedstatus-signals.html Saved status signals]:
     101 * [/doxygen/dev2.x.y/html/savedstatus-signals.html Saved status signals]:
    102102    * savedstatus-changed
    103  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/sound-signals.html Sound signals]:
     103 * [/doxygen/dev2.x.y/html/sound-signals.html Sound signals]:
    104104    * playing-sound-event
    105  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/xfer-signals.html File transfer signals]:
     105 * [/doxygen/dev2.x.y/html/xfer-signals.html File transfer signals]:
    106106    * file-recv-complete, file-recv-request, file-send-accept, file-send-start, file-send-cancel, file-send-complete
    107107
     
    127127Your registered callback function in a plugin might also have an effect on Pidgin by changing the values of parameters it gets.
    128128
    129 You can't do any of this in a D-Bus script. Look at [http://developer.pidgin.im/doxygen/dev2.x.y/html/signal-howto.html Signals HOWTO] to see how to use signals in plugins.
     129You can't do any of this in a D-Bus script. Look at [/doxygen/dev2.x.y/html/signal-howto.html Signals HOWTO] to see how to use signals in plugins.
    130130
    131131Even with read-only plugins, there is a lot you can do:
     
    170170And this still does unexpected things when your current status is a complex one.
    171171
    172 The only reference for the available functions is the [http://developer.pidgin.im/doxygen/dev2.x.y/html/files.html documentation for the header files], so you want to look there to figure out which functions you need to call.
     172The only reference for the available functions is the [/doxygen/dev2.x.y/html/files.html documentation for the header files], so you want to look there to figure out which functions you need to call.
    173173
    174174Here are a few of the useful ones:
    175175
    176  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/account_8h.html Your accounts]:
     176 * [/doxygen/dev2.x.y/html/account_8h.html Your accounts]:
    177177   * Get a particular account: `PurpleAccountsFind(name, protocol)`
    178178   * Get all active accounts: `PurpleAccountsGetAllActive()`
     
    183183   * Set its icon: `PurpleAccountSetBuddyIconPath(account, path)`
    184184
    185  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/blist_8h.html Your buddies]:
     185 * [/doxygen/dev2.x.y/html/blist_8h.html Your buddies]:
    186186   * Get list of all buddies: `PurpleFindBuddies(account,screenname)` [Second argument NULL, to search for all]
    187187   * Get a particular buddy: `PurpleFindBuddy(account, screenname)`
     
    192192   * Get the account a buddy belongs to: `PurpleBuddyGetAccount(buddy)`
    193193
    194  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/savedstatuses_8h.html Your own status] ([http://developer.pidgin.im/doxygen/dev2.x.y/html/status_8h.html also]):
     194 * [/doxygen/dev2.x.y/html/savedstatuses_8h.html Your own status] ([/doxygen/dev2.x.y/html/status_8h.html also]):
    195195   * Some constants you can't get through the D-Bus interface yet:
    196196{{{
     
    211211   * Actually set the status with: `PurpleSavedstatusActivate(status)`
    212212
    213  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/conversation_8h.html Your conversations]:
     213 * [/doxygen/dev2.x.y/html/conversation_8h.html Your conversations]:
    214214   * Get all conversations: `PurpleGetConversations()`
    215215   * Get all IMs: `PurpleGetIms()`
     
    222222   * Send an IM message with: `PurpleConvImSend(im, message)`
    223223
    224  * [http://developer.pidgin.im/doxygen/dev2.x.y/html/prefs_8h.html Preferences]:
     224 * [/doxygen/dev2.x.y/html/prefs_8h.html Preferences]:
    225225   * Get a preference: `PurplePrefsGetBool`, `PurplePrefsGetString`, etc.
    226226   * Set a preference: `PurplePrefsSetInt`, `PurplePrefsSetPath`, etc.
    227227
    228 There are other things you can do; see the [http://developer.pidgin.im/doxygen/dev2.x.y/html/main.html documentation] and the source files.
     228There are other things you can do; see the [/doxygen/dev2.x.y/html/main.html documentation] and the source files.
    229229
    230230== Further reading ==
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!