Unregistering a user at the Jabber Server.
We work on a version of this function that returns a un-/successful unregistration
information.
jb_removebuddy
Overview
Removing buddy('s) from a user roster.
Syntax
[1] jb_removebuddy screenname screenname ...
Description
[1] jb_removebudy This function is not limited to the amount of parameters,each parameter must be a valid
sreenname (a screenname is a jid with out the Server portion).
The first parameter has to be the screenname of the user who wants to remove someones jid from his roster (e.g. the one who is triggering this function), all other parameters are the screennames to be removed from the firsts roster.
If a screenname contains invalid charakters this function returns an error, if a screenname is spelled corectly but is not valid the function will not return an error and no action to this specific screenname takes place. The roster held in the users preferred Jabber Client (if the user is online) will not change till the user does a relogin.
Syntax
[2] jb_removebuddy list1 list2 .... listn
Description
[2]jb_removebuddy works like [1]jb_removebuddy except that it gets past lists instaed of
simple variables. A list consists of :
jb_removetransbuddy
Overview
Removing a buddy from other IM Systems, from the Roster of the Web Server Client to stop tracking their presence.
Syntax
jb_removetransbuddy screenname Transport_ID
Description
jb_removetransbuddy This function takes two parameters the first is a Screenname from any IM System that is available, the second is the Transport ID of the IM System (transport) to wich the screenname belongs.
jb_sendxml
Overview
Sending raw XML.For developers to test new XML.
Syntax
jb_sendxml XML
Description
jb_sendxml This function takes one parameter that consists of serialised XML (Serialised XML is a string of XML - Tag's).
It is used by developers only to test new XML , the XML will be directly send to the Jabber server without any tests.
If the Jabber server does not accept the XML as valid Jabber XML it will disconect the client.
NOTE
This function is not password protected any tcl programmer can call it.
It is also possible that the Jabber server disconnects the client, if bad XML is passed.
jb_get_transport_url_from_id
Overview
Retrieving the URL of a transport from the local Jabber Server
Syntax
URL jb_get_transport_url_from_id ID
Description
jb_get_transport_url_from_id This function takes one parameter, the ID of a transport. It returns the URL this Transport uses.It is manly used to form JID's .
Example:
db_select get_jabber_information "SELECT screen , service FROM jb_screens WHERE user_id = :user_id"
set users_jid "$screen@[jb_get_transport_url_from_id [jb_get_transport_id_from_symbol $service]]"
jb_message $users_jid "This is your jid $users_jid"
This view lines of code retrieve the abstract stored user information from the db. The screen name from one IM System and a Identifier for the service the screen name belongs to. The ns_jabber module stores all URL's
of the local Jabber Server in an array (not tcl array) , it needs a correct id to identify the correct transport. The function jb_get_transport_id_from_symbol is written in tcl , it converts the symbol (easy to read) used to identify a service (transport in jabber terms) in your System into the correct transport id.
jb_createconferenceroom
Overview
Start recording a chat from the local Jabber Server Conference service.
Syntax
int jb_createconferenceroom RoomName user_id Threadname creator_jid short description
Description
jb_createconferenceroom
This function takes a RoomName the user_id of the creator , a topic name Threadname (which will only be used in case it is the first time this room is recorded), the creator_jid and a short description as parameters. This function will start to record the chat in the conference Room RoomName , if this Room hasn't been opened when it is called , it opens up this Room at the local Jabber Conference Service.
If it is the first time a Chat in this Room is Recorded , it will also create a new entry in the table jb_conference_rooms (or an abstraction) and a new entry in the table jb_conference_room_threads
(or an abstraction) . In case a Chat from this Room has been recorded before , it will create a new entry in the table jb_conference_room_threads (or an abstraction) only. In case of an error it returns -1 and 0 otherwise.
jb_delconferenceroom
Overview
Stop recording a chat from the local Jabber Server Conference service.
Syntax
int jb_delconferenceroom RoomName
Description
jb_delconferenceroom
This function takes a RoomName as parameter, a call to this function will stop the recording of the Chat in the Room RoomName. The recording of this Room can be restarted by a call to jb_createconferenceroom.
This function returns -1 on an error and 0 otherwise.
jb_new_subject
Overview
Sending a new subject (Topic) to a Room at the Jabber Server Conference service.
Syntax
int jb_new_subject RoomName New_Thread_name explaination_of_Thread_Name [optional existing thread_id]
Description
jb_new_subject
This function takes a RoomName New_Thread_name explaination_of_Thread_Name and optional an existing thread_idas parameter, a call to this function will stop the recording of the current subject in the Room RoomName. The recording of this Room will go on, but every thing will eather be stored with the passed in thread_id (to append the discussion of an old subject) in this case New_Thread_name and explaination_of_Thread_Name will NOT overwrite the old values, or with a internaly new created thread_id if none is passed in. In the second case New_Thread_name and explaination_of_Thread_Name will be written into the db. (See SQL doc,check table jb_conference_room_threads for details).
This function returns -1 on an error and 0 otherwise.
jb_new_subject
Overview
Sending a old subject (Topic) to a Room at the Jabber Server Conference service to append the recordings of this subject, incase the Room is not active it will be restarted automatically.
Syntax
int jb_new_subject RoomName New_Thread_name explaination_of_Thread_Name existing_thread_id
Description
jb_new_subject
This function takes a RoomName New_Thread_name explaination_of_Thread_Name and an existing thread_id as parameter, a call to this function will stop the recording of the current subject in the Room RoomName. The recording of this Room will go on, but every thing will eather be stored with the passed in thread_id (to append the discussion of an old subject) in this case New_Thread_name and explaination_of_Thread_Name will NOT overwrite the old values, in case the Room is not active at the moment it will be restated.
This function returns -1 on an error and 0 otherwise.
jb_activeconferencerooms
Overview
Returns a ns_set with all Conference Rooms that get recorded at the moment.
Syntax
ns_set id jb_delconferenceroom
Description
jb_activeconferencerooms
This function is called with no parameters , it returns a ns_set . This ns_set has the names of the active Rooms as its keys , and ns_set's as values. The ns_set's store more detailed information about the room .
Example:
set active_rooms [jb_activeconferencerooms]
if {$active_rooms != -1} {
set room_count [ns_set size $active_rooms] }
set html "<TABLE> <tr> <th> Room Name </th> <th> Current Topic </th></tr>"
for {set i 0} {i < $row_count} {incr i}{
append html "<tr><td>[ns_set key $active_rooms $i] </td><td>[ns_set value [ns_set value $active_rooms $i ] 1]</td></tr>"
}
append html "</table>"
This example calls jb_activeconferencerooms and stores the ns_set ID in the variable active_rooms, it checks if the function hasent returned -1 (no error). Then it reads the size of the ns_set into the variable row_count . Then in a for loop , it loops through the returned ns_set putting its keys in the first column of the table , and in the second column it first reads the ns_set ID from the keys (roomNames) value pair , and then from this ns_set it reads the value from position 1 (wich holds the topic of this room).
Structur of the ns_set returned by jb_activeconferencerooms
jb_activeroommembers
Overview
Returns a ns_set with all Members from a Conference Room that gets recorded at the moment.
Syntax
ns_set id jb_activeroommembers RoomName
Description
jb_activroommembers
This function is called with a RoomName as parameter, it returns a ns_set . This ns_set has the current nicks (nick inside a Room) of the Members who are inside this Room as its keys , and ns_set's as values. The ns_set's store more detailed information about the Member .
Structur of the ns_set returned by jb_activeroommembers:
jb_invite
Overview
Sends a Invite to a Conference Room , to a user.
Syntax
int jb_invite Jid RoomName Topic A_short_message Type
Description
jb_invite
This function is called with
a Jid to send the invite to, the RoomName to which the recipient should be invited to, the Topic that will be discused in the room, a A short message that lets the recipient know why he got invited , and the Type of the invite. The type can be 1 or 2 , standing for the versions v.1 and v.2. Right know v.1 is the preferred way to invite some one to a Conference Room, most Jabber Clients support this version , the Room RoomName doesn't needs to be recorded to send an invite to this Room. While v.2 is more power full but not all Jabber Clients support this version jet, the Room RoomName has to be recorded to send an invite to this Room.
jb_new_subject
Overview
Sends a new subject (Topic) to a Conference Room .
Syntax
int jb_new_subject RoomName TopicName Description_of_the_new_Topic
Description
jb_new_subject
This function is called with
a RoomName to send the subject change to, the TopicName to change to and a Description of the new topic. This function worcks only on Rooms that get recorded at the moment.
Back to design page
Author: