|
Yate
|
An account's MUC room contact. More...
#include <yatecbase.h>
Public Member Functions | |
| MucRoom (ClientAccount *owner, const char *id, const char *name, const char *uri, const char *nick=0) | |
| MucRoomMember & | resource () |
| bool | ownMember (MucRoomMember *item) const |
| bool | ownMember (const String &item) const |
| bool | available () const |
| bool | canChat () const |
| bool | canChatPrivate () const |
| bool | canChangeSubject () const |
| bool | canInvite () const |
| bool | canKick (MucRoomMember *member) const |
| bool | canBan (MucRoomMember *member) const |
| Message * | buildMucRoom (const char *oper) |
| Message * | buildJoin (bool join, bool history=true, unsigned int sNewer=0) |
| virtual MucRoom * | mucRoom () |
| virtual ClientResource * | status (bool ref=false) |
| MucRoomMember * | findMember (const String &nick) |
| MucRoomMember * | findMember (const String &contact, const String &instance) |
| MucRoomMember * | findMemberById (const String &id) |
| bool | hasChat (const String &id) |
| virtual void | flashChat (const String &id, bool on=true) |
| virtual void | getChatInput (const String &id, String &text, const String &name="message") |
| virtual void | setChatInput (const String &id, const String &text=String::empty(), const String &name="message") |
| virtual void | getChatHistory (const String &id, String &text, bool richText=false, const String &name="history") |
| virtual void | setChatHistory (const String &id, const String &text, bool richText=false, const String &name="history") |
| virtual void | addChatHistory (const String &id, const String &what, NamedList *¶ms, const String &name="history") |
| virtual void | setChatProperty (const String &id, const String &name, const String &prop, const String &value) |
| virtual bool | showChat (const String &id, bool visible, bool active=false) |
| virtual void | createChatWindow (const String &id, bool force=false, const char *name=0) |
| virtual void | updateChatWindow (const String &id, const NamedList ¶ms) |
| virtual bool | isChatActive (const String &id) |
| void | destroyChatWindow (const String &id=String::empty()) |
| virtual ClientResource * | findResource (const String &id, bool ref=false) |
| virtual ClientResource * | appendResource (const String &nick) |
| virtual bool | insertResource (ClientResource *res) |
| virtual bool | removeResource (const String &nick, bool delChat=false) |
Public Attributes | |
| String | m_password |
Protected Member Functions | |
| virtual void | destroyed () |
An account's MUC room contact.
This class holds a client account's MUC room contact. The list of resources contains MucRoomMember items. Contact nick is held by own MucRoomMember name The contact uri is the room uri The contact name is the room name The contact resource member uri is the account's uri
| MucRoom | ( | ClientAccount * | owner, |
| const char * | id, | ||
| const char * | name, | ||
| const char * | uri, | ||
| const char * | nick = 0 |
||
| ) | [explicit] |
Constructor. Append itself to the owner's list
| owner | The contact's owner |
| id | The contact's id |
| name | Room name |
| uri | Room uri |
| nick | Optional room nick |
| virtual void addChatHistory | ( | const String & | id, |
| const String & | what, | ||
| NamedList *& | params, | ||
| const String & | name = "history" |
||
| ) | [virtual] |
Add an entry to chat history
| id | Member id |
| what | Item to add (chat_in, chat_out, ...) |
| params | Chat history item parameters (it will be consumed and zeroed) |
| name | Chat history widget name |
| virtual ClientResource* appendResource | ( | const String & | nick | ) | [virtual] |
Append a member having a given nick
| nick | Member nick |
Reimplemented from ClientContact.
| bool available | ( | ) | const [inline] |
Check if the user has joined the room
Build a muc.room message used to login/logoff
| join | True to login, false to logoff |
| history | True to request room history. Ignored if join is false |
| sNewer | Request history newer then given seconds. Ignored if 0 or history is false |
| Message* buildMucRoom | ( | const char * | oper | ) | [inline] |
Build a muc.room message. Add the room parameter
| oper | Operation parameter |
References NamedList::addParam(), and Client::buildMessage().
| bool canBan | ( | MucRoomMember * | member | ) | const |
Check if the user can ban a given room member
| member | Room member |
| bool canChangeSubject | ( | ) | const [inline] |
Check if the user can change room subject
| bool canChat | ( | ) | const [inline] |
Check if room chat can be sent
| bool canChatPrivate | ( | ) | const [inline] |
Check if private chat can be sent
| bool canInvite | ( | ) | const [inline] |
Check if join invitations can be sent
| bool canKick | ( | MucRoomMember * | member | ) | const |
Check if the user can kick a given room member
| member | Room member |
| virtual void createChatWindow | ( | const String & | id, |
| bool | force = false, |
||
| const char * | name = 0 |
||
| ) | [virtual] |
Create a member's chat
| id | Member id |
| force | True to destroy the current one if any |
| name | The window's name. Defaults to global name if empty |
| void destroyChatWindow | ( | const String & | id = String::empty() | ) |
Close a member's chat or all chats
| id | Member id. Let it empty to clear all chats |
| virtual void destroyed | ( | ) | [protected, virtual] |
Remove from owner. Destroy the chat window. Release data
Reimplemented from ClientContact.
| MucRoomMember* findMember | ( | const String & | nick | ) |
Retrieve a room member (or own member) by its nick
| nick | Nick to find |
| MucRoomMember* findMember | ( | const String & | contact, |
| const String & | instance | ||
| ) |
Retrieve a room member (or own member) by its contact and instance
| contact | Member's contact |
| instance | Member's instance |
| MucRoomMember* findMemberById | ( | const String & | id | ) |
Retrieve a room member (or own member) by its id
| id | Member id to find |
| virtual ClientResource* findResource | ( | const String & | id, |
| bool | ref = false |
||
| ) | [virtual] |
Retrieve a room member (or own member) by its id
| id | The id of the desired member |
| ref | True to obtain a referenced pointer |
Reimplemented from ClientContact.
Flash chat window/item to notify the user
| id | Member id |
| on | True to start, false to stop flashing |
| virtual void getChatHistory | ( | const String & | id, |
| String & | text, | ||
| bool | richText = false, |
||
| const String & | name = "history" |
||
| ) | [virtual] |
Retrieve the contents of the chat history widget
| id | Member id |
| text | Chat history text |
| richText | Retrieve rich/plain text flag |
| name | Chat history widget name |
| virtual void getChatInput | ( | const String & | id, |
| String & | text, | ||
| const String & | name = "message" |
||
| ) | [virtual] |
Retrieve the contents of the chat input widget
| id | Member id |
| text | Chat input text |
| name | Chat input widget name |
Check if a given member has chat displayed
| id | Member id |
| virtual bool insertResource | ( | ClientResource * | res | ) | [inline, virtual] |
Insert a resource in the list by its priority. If the resource is already there it will be extracted and re-inserted
| res | The resource to insert |
Reimplemented from ClientContact.
| virtual bool isChatActive | ( | const String & | id | ) | [virtual] |
Check if a member's chat is active
Return a MucRoom contact from this one
Reimplemented from ClientContact.
| bool ownMember | ( | MucRoomMember * | item | ) | const [inline] |
Check if a given resource is the contact's member
| item | Member pointer to check |
Check if a given resource is the contact's member
| item | Member id to check |
References ClientResource::toString().
| virtual bool removeResource | ( | const String & | nick, |
| bool | delChat = false |
||
| ) | [virtual] |
Remove a contact having a given nick
| nick | The contact nick |
| delChat | True to delete the chat |
| MucRoomMember& resource | ( | ) | [inline] |
Retrieve room resource
| virtual void setChatHistory | ( | const String & | id, |
| const String & | text, | ||
| bool | richText = false, |
||
| const String & | name = "history" |
||
| ) | [virtual] |
Set the contents of the chat history widget
| id | Member id |
| text | Chat history text |
| richText | Set rich/plain text flag |
| name | Chat history widget name |
| virtual void setChatInput | ( | const String & | id, |
| const String & | text = String::empty(), |
||
| const String & | name = "message" |
||
| ) | [virtual] |
Set the chat input widget text
| id | Member id |
| text | Chat input text |
| name | Chat input widget name |
| virtual void setChatProperty | ( | const String & | id, |
| const String & | name, | ||
| const String & | prop, | ||
| const String & | value | ||
| ) | [virtual] |
Set a chat widget' property
| id | Member id |
| name | Widget name |
| prop | Property name |
| value | Property value |
Show or hide a member's chat
| id | Member id |
| visible | True to show, false to hide |
| active | True to activate the chat |
| virtual ClientResource* status | ( | bool | ref = false | ) | [inline, virtual] |
Find the resource with the lowest status (room resource)
| ref | True to obtain a referenced pointer |
Reimplemented from ClientContact.
| virtual void updateChatWindow | ( | const String & | id, |
| const NamedList & | params | ||
| ) | [virtual] |
Update member parameters in chat window
| id | Member id |
| params | Parameters to set |
Room password
1.7.6.1