line

XSkype plugin v0.26

PLUGIN FOR XLOBBY

by Dalibor Lanik

line

Remark: changes from previous version are marked in blue.


 

Installation (with the sample skin):

 

·      Install latest version of Skype 2.x, available from:

            http://www.skype.com/download/skype/windows/

 

·      Install ActiveS API, available from:

            http://share.skype.com/directory/actives/view/

            http://www.khaoslabs.com/actives.php

 

·      Install XScriptNG plugin in order to use all features of sample XSkype skin (optional)

 

  • Run installer exe

 

·      To start with the sample Xskype skin, set it up as your default skin in xlobby.xml, located in XLobby root folder, typically: c:\Program Files\XLobby\. Find the line with <skin>default</skin> and replace the skin name with „XSkype“ so it looks like this: <skin>XSkype</skin>

 

Notice:

·    Skype should be started prior to Xlobby because the plugin is connecting to Skype on initialization (i.e. you shouldn’t try starting Skype from within Xlobby because by then it’s too late).

·    This plugin was tested with the Xlobby build dated 31/05/2006 and Skype 2.0.0.107 (latest as of this writing).

 

Commands:

 

There are several commands in XSkype. They can be found in configuration dialog of XLobby by pressing F2, under events tab, by adding plugin command.

 

 

Here is the list with brief descriptions what they do:

 

Connect                       [no parameters]

        ·              Connects event handler. You must do this in order to be notified of events from Skype. It's up to you how (where) you connect. I do it in startup group of XLobby. You can connect on Skype screen entry, and disconnect on screen exit, but then you wouldn't receive calls info when you're not on Skype screen.

 

Disconnect                   [no parameters]

·      Disconnects event handler. I.e. if you watch a film and don’t want to be disturbed by calls, you could disconnect, and reconnect on movie end (But then again, you could only change status to „Invisible“ J to achieve the same)

 

ToggleMute                 [no parameters]

·      Toggles Mute on/off. Works only while in a call.

 

GetContacts                 [no parameters]

·      Retreives all your contacts (buddies) into the database. Might take several seconds. The database name is hard-coded into the plugin and is called skype_contacts.xml.

 

GetOwnProfile             [no parameters]

·      Retreives your profile info into the database.The database name is hard-coded into the plugin and is called skype_profile.xml.

 

HangupAllCalls            [no parameters]

·      When in a call, hangs up all open calls.

 

CallContact                  [contact handle]

·      Calls contact specified in parameter. You can use something like %skype>parameter% to call person highlighted in your contacts list (category).

 

BlockUser                    [contact handle]

·      Blocks user specified in parameter. You can use something like %skype>parameter% to block person highlighted in your contacts list.

 

UnBlockUser                [contact handle]

·      Unblocks user specified in parameter. You can use something like %skype>parameter% to unblock person highlighted in your contacts list.

 

SetOwnOnlineStatus   [status]

·      Sets your online status. Can be one of the following (specified in parameter): ONLINE, OFFLINE, DND, NA, AWAY, SKYPEME or INVISIBLE

 

GetChatMessages        [handle]

·      Retrieves chat history messages from user handle specified in parameter into the database. You can use something like %skype>parameter% to get messages from highlighted contact in your contacts list. The database name is hard-coded into the plugin and is called skype_usr_messages.xml

 

GetAllChatMessages    [no parameters]

·      Retrieves all history chat messages into the database. The database name is hard-coded into the plugin and is called skype_messages.xml

 

SortContacts                [no parameters]

·      Sorts skype contacts category by database field specified in Xlobby variable skype_sort. This can be one of the following: handle, onlinestatus, sortstatus, blocked, sex, country, city, about, mood, Province, Phone_Home, Phone_Office, Phone_Mobile, Homepage. Even though it doesn’t make much sense to sort it on last 7 entries. Field sortstatus is there so online and skypeme contacts could appear at top, followed by other online but away or DND contacts, with offline contacts at the bottom.

·      This is implemeted in such way, so automatic update of user online status would know on what to sort contacts when it updates.

 

FilterContacts              [no parameters]

·      Filters skype contacts category by displaying only online contacts or all contacts. Set Xlobby variable skype_filter to True or False. True displays only online contacts, while False displays all contacts.

·      This is implemeted in such way, so automatic update of user online status would know what to display when it updates.

 

CallAnswer                  [no parameters]

·      Receives incoming call

 

CallReject                    [no parameters]

·      Rejects incoming call. Contact on the other end sees "rejected" message.

 

GetMissedCalls            [no parameters]

·      Gets a list of missed calls, into the database. The database name is hard-coded into the plugin and is called skype_missed_calls.xml

 

GetCallsHistory            [no parameters]

·      Gets a list of calls history, into the database. The database name is hard-coded into the plugin and is called skype_calls.xml

 

GetWaitingForAuth      [no parameters]

·      Gets list of users waiting to be authorized by you. The database name is hard-coded into the plugin and is called skype_wait4auth.xml

 

AuthorizeUser              [handle]

·      Authorise user to add you to the list and see your online status. User handle passed as parameter. You can use something like %skype_wait4auth>handle% to pass user selected in the list.

 

DismissUser                 [handle]

·      Do not authorise user to add you to the list and see your online status. User handle passed as parameter.

 

ClearHistory                 [history]

·      Clear Skype history or mark missed events as seen. Requires parameter: CALL, VOICEMAIL, CHAT, MISSED_CALLS, MISSED_CHATS

 

ChatSendMessage       [handle]

·      Sends message to user with handle

 

SearchForUser             [search string]

·      Search for user with name or handle containing parameter string. Results stored in database skype_search.xml

 

UserAdd                       [handle]

·      Add user with handle to the contact list and request authorisation (with generic message)

 

UserRemove                [handle]

·      Removes user with handle from the buddy list

 

Note that all parameters requesting user handle means handle, not name! :-) I.e. my name is „Dalibor Lanik“, while my handle is „dalanik“.

 

Variables:

 

You can use those on buttons or text fields to display info from Skype (along with fields from databases).

 

plugin>XSkype>OwnOnlineStatus                 * displays in text your online status

plugin>XSkype>OwnOnlineStatusIcon                         * displays your online status icon (if you use Visual HTPC font) 1

plugin>XSkype>OwnOnlineStatusImage                     * displays own status image

plugin>XSkype>UserBlockedStatus                             * displays block status of currently selected user in database skype_contacts

plugin>XSkype>CallID                                                       * displays call ID number (if call is active)

plugin>XSkype>CallStatus                                              * displays call status (i.e. ringing, connected, etc) (if call is active)

plugin>XSkype>CallType                                                  * displays call type (i.e. P2P) (if call is active)

plugin>XSkype>CallPartnerHandle                               * displays call partner handle (person you’re talking to) (if call is active)

plugin>XSkype>CallPartnerDisplayName                    * displays call partner name (person you’re talking to) (if call is active)

plugin>XSkype>CallPartnerStatus                                * displays call partner (person you’re talking to) status in text (if call is active)

plugin>XSkype>CallPartnerStatusIcon                        * displays call partner (person you’re talking to) status icon (if you use Visual HTPC font) (if call is active) 1

plugin>XSkype>CallPartnerStatusImage                    * displays status image of call partner (if call is active)

plugin>XSkype>Mute                                                        * displays mute status

plugin>XSkype>StatusImage_Away                             * displays image2

plugin>XSkype>StatusImage_Blocked                        * displays image2

plugin>XSkype>StatusImage_Do Not disturb             * displays image2

plugin>XSkype>StatusImage_Invisible                        * displays image2

plugin>XSkype>StatusImage_Not Available               * displays image2

plugin>XSkype>StatusImage_Offline                           * displays image2

plugin>XSkype>StatusImage_Offline Voicemail       * displays image2

plugin>XSkype>StatusImage_Online                           * displays image2

plugin>XSkype>StatusImage_Pending                        * displays image2

plugin>XSkype>StatusImage_Skype Me                     * displays image2

plugin>XSkype>MissedCallNum                                    * displays number of missed calls3

plugin>XSkype>MissedChatNum                                   * displays number of missed messages3

plugin>XSkype>ContactsNum                                        * displays number of contacts in your contacts list3

plugin>XSkype>OnlineContactsNum                            * displays number of contacts online (all except offline and invisible) 3

plugin>XSkype>WaitingAuthorizatonNum                   * displays number of authorization requests waiting3

 

1 Since there are now status images, status icons (by the means of Visual HTPC font)  are no longer required, but are still there if you want to use them.

2 Since the images are already there, why not make them available in this way J Just specify the image instead of copying it to the skins folder and inserting it through Xlobby editor.

3 These are updated once every 60 seconds

 

Events

 

These are not really visible in XSkype plugin, but they are key elements which help you display notifications when there’s incoming call, or automatically update your contact list (category) when one of your buddies (contacts) changes online status, i.e. from „online“ to „do not disturb“.

 

For the time being, there are 4 events which will be triggered by Xskype:

 

·      Incoming call – this will be triggered when someone calls you. This event relies on existence of several screens (which you can ofcourse find in sample XSkype skin, or change their names in the configuration, read further), that is, overlays. These are displayed on following events:

 

incoming call                 -           overlay-skype-incoming

outgoing call                  -           overlay-skype-outgoing

call in progress              -           overlay-skype-inprogress

finished call                   -           overlay-skype-finished

 

·      Incoming chat message – this is triggered when somebody sends you a chat message. Therefore, and overlay must exits:

 

overlay-skype-chat

 

·      Incoming authorization request – this is triggered when somebody sends you authorization request. Therefore, and overlay must exits:

 

overlay-skype-auth

 

·      User status change is triggered when your contact (buddy) changes from i.e. online to offline. Xlobby database skype_contacts.xml is updated with user’s current status automatically. It is dependant on the database name, as this is hard-coded into the plugin.

 

            So, overlays with names known to the plugin must exist in order to receive notifications. By default, the names are as specified above, but you can change these in the configuration:

 

 

       When you first run XLobby with XSkype plugin, open configuration with F2, go to plugins, select Xskype and  select "configure" button When you press OK, the values will be saved to registry (if you don't open configuration, default values will be asumed).

 

      The keys are located in:

 

      HKCU\Software\Visual\XLobby\XSkype

 

      The values are:

 

"ovr_inc_call", incoming call overlay name, ie. overlay-skype_incoming_call

"ovr_out_call", outgoing call overlay name

"ovr_prg_call", call in progress overlay name

"ovr_end_call", call ended overlay name

"ovr_inc_chat", incoming chat overlay name

"ovr_inc_auth", incoming authorization overlay name

 

 

Databases

            8 databases are created by XSkype:

 

·      skype_contacts.xml - contains all your contacts

fields imported:

§ handle

§ display name

§ coverart

§ offline (True/False)

§ onlinestatus

§ onlinestatusicn

§ sortstatus

§ blocked

§ sex

§ country

§ city

§ about

§ mood

§ hascalleq

§ Province

§ Phone_Home

§ Phone_Office

§ Phone_Mobile

§ Homepage

 

·      skype_profile.xml – contains your profile info

fields imported:

§ handle

§ display name

§ sex

§ country

§ city

§ about

§ Province

§ Phone_Home

§ Phone_Office

§ Phone_Mobile

§ Homepage

§ balance (in eurocents)

 

·      skype_messages.xml – contains all chat messages

fields imported:

·      parameter (handle)

·      display (display name)

·      body (message text)

·      time (datetime)

·      hhmm (time of message)

 

·      skype_chat.xml – contains chat messages for current chat

fields imported:

·      parameter (handle)

·      display (display name)

·      chatid (internal chat id)

·      body (message body)

·      time (date/time of message)

·      hhmm (time of message)

 

·      skype_missed_calls.xml – contains list of missed calls

fields imported:

§ parameter (handle)

§ display (display name)

§ failurereason

§ status

§ time (datetime)

 

·      skype_calls.xml – contains list of calls history

fields imported:

§ parameter (handle)

§ display (display name)

§ failurereason

§ status

§ time (datetime)

 

·      skype_wait4auth.xml – contains list of users waiting to be authorized

fields imported:

§ handle

§ display name

§ sex

§ country

§ city

§ about

§ Province

§ Phone_Home

§ Phone_Office

§ Phone_Mobile

§ Homepage

 

·      skype_search.xml

fields imported:

§ parameter (handle)

§ display (display name)

 

The (empty) databases are created automatically each time when you run Xlobby with XSkype plugin, so you can use them immediately (i.e. no need to restart Xlobby in order for it to see the databases).

 

Dependencies

 

These are things that must exist in your skin. This is necessary in order to have auto-update of categories and notifications.

 

Databases (created automatically):

·      skype_contacts.xml - contains all your contacts (category name: skype)

·      skype_profile.xml – contains your profile info

·      skype_messages.xml – contains all chat messages

·      skype_chat.xml – contains current chat

·      skype_missed_calls.xml – contains list of missed calls

·      skype_calls.xml – contains list of calls history

·      skype_wait4auth.xml – contains list of users waiting to be authorized

·      skype_search.xml – user search results

 

Overlays (to display calls and chat): UNLESS SPECIFIED OTHERWISE IN THE CONFIGURATION!

·      overlay-skype-incoming

·      overlay-skype-outgoing

·      overlay-skype-inprogress

·      overlay-skype-finished

·      overlay-skype-chat

·      overlay-skype-auth

 

Variables (you have to set these in Xlobby, best in start group):

·      skype_sort

values: handle, display, onlinestatus, sortstatus, blocked, sex, country, city, about, mood, hascalleq, Province, Phone_Home, Phone_Office, Phone_Mobile, Homepage

default value: display 2

Used for auto-update of contacts list – when category is refreshed, plugin has to know by which criteria to re-sort the list

 

·      skype_filter

values: True, False

§ False – displays only online contacts

§ True – displays all contacts

default value: False 1

Used to filter records; displays either all or only online contacts. Also used during auto-refresh of category

 

·      skype_notifycall

values: True, False

default value: True 1

notification when there is call On/Off

 

·      skype_notifymessage

values: True, False

                        default value: True 1

notification when there is message On/Off

 

·      skype_notifychat

values: True, False

default value: True 1

notification when there is chat On/Off

 

1 Case independant, so it can be True, TRUE, true or TrUe, etc.

2 Case dependant

 

Errors and logging

 

            Errors are logged in file c:\program files\xlobby\xskype_log.txt, and in Xlobby variable XSkype_debug. The XSkype_debug variable also contains description of all executed plugin commands and received events.

 

To enable logging of all executed plugin commands and received events to the xskype_log.txt file, check the „log“ checkbox in the configuration.

 

Skin

 

Contrary to the previous versions of the example skin, in this version, GetContacts command can be executed from the startup group, so once you execute this in startup, there’s no need to execute it later anymore, because list will be updated automatically. Notice that you must have Xlobby build dated 31/05/2006 or later! This is due to the fact that Xlobby initialized plugins after running startup group (fixed in latest build).

 

Integration (Tweaks)

 

Since Skype pops up it’s window on all incoming calls, and it is impossible to prevent this, there are a couple of things you must do in order to get seamless integration with your HTPC, that is, Xlobby, so Skype window doesn’t pop up. I try, in plugin, to do it – by minimizing the Skype window on placing calls, but this doesn’t work all the time, god knows why. Here‘s what to do:

 

  • Open Skype
  • In Options, under Notifications Tab, uncheck all notifications:

 

 

 

  • Under Advanced Tab, uncheck „Automatically pop up requests...“ :

 

 

 

  • Log off Skype and then exit the program
  • Then you need to make an alteration in your config.xml file:
  • To find Config .xml copy and paste the section in bold:
    • %AppData%\Skype in the address bar of Windows Explorer or IE and it will display all the files in that folder:

 

 

    • You will see a folder with the same name as your Skype username;
    • Double click this folder to open it, and you will see the config.xml file you have to alter: (right click it and select edit)

 

 

    • In <Calls> section modify following values from 1 to 0:

 

<Calls>

<AllowMultiCalls>0</AllowMultiCalls>

<FriendsAutoAnswer>0</FriendsAutoAnswer>

<FriendsPopup>1</FriendsPopup> -------------set to 0 zero

<OthersAutoAnswer>0</OthersAutoAnswer>

<OthersPopup>1</OthersPopup> ------------------set to 0 zero

<PopupOnAll>0</PopupOnAll>

</Calls>

 

    • In the section <MainWindow>, change the X setting to be negative width (so Skype main window opens off-screen), ie. If width is 403, set X to -403:

 

<MainWindow>

<Height>727</Height>

<Width>500</Width>

<X>403</X> ------------------set to negative <Width>

<Y>7</Y>

</MainWindow>

 

  • Once you have done the above alterations save this file and restart Skype.

 

 

To do:

 

  • Rework Chat to allow several open chat sessions
  • Multi-user chat and call conference

·      Bug fixes

 

If you have any comments, suggestions or requests, send a post to Xlobby forum, plugins\Skype plugin topic, or e-mail me at dalibor@lanik.org

 

Dalibor Lanik

Prague, July 2006