C# Класс jabber.connection.Room

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ConfigForm void
Configured void
FinishConfigDefault void
GotList void
OnJoinPresence void
OnLeavePresence void
Room System
m_stream_OnAfterPresenceOut void
m_stream_OnDisconect void
m_stream_OnProtocol void

Открытые методы

Метод Описание
Ban ( JID jid, string reason ) : void

Ban a user from re-joining the room. Must be an admin.

ChangeAffiliation ( JID jid, RoomAffiliation affiliation, string reason ) : void

Change the affiliation (long-term) with the room of a user, based on their real JID.

ChangeRole ( string nick, RoomRole role, string reason ) : void

Change the role of a user in the room, by nickname. Must be a moderator.

Configure ( ) : void

Configures the room. OnRoomConfig MUST be set first. OnRoomConfig will be called back in the GUI thread if there is an InvokeControl on your XmppStream. Make sure that OnRoomConfig does not return until it has the answer, typically by popping up a modal dialog with the x:data form.

GrantMembership ( JID jid, string reason ) : void

Make this user a member of the room.

GrantVoice ( string nick, string reason ) : void

Un-mute a muted user. Give them "voice".

Invite ( JID invitee, string reason ) : void

Invite a user to join the room.

Join ( ) : void

Joins the room. If the room is created, Configure() will be called automatically.

Join ( string password ) : void

Join a room, using a password.

Kick ( string nick, string reason ) : void

Kick the given user from the room, based on their nickname.

Leave ( string reason ) : void

Exits the room. This cleans up the entry in the ConferenceManager, as well.

MakeModerator ( string nick ) : void

Make this user a moderator of the room.

ModifyAffiliations ( ParticipantCollection parties, string reason, IqCB callback, object state ) : void

Modify the roles of the parties in this list. To use, retrive a ParticipantCollection, change the roles of the parties in that collection, then pass that modified collection in here.

ModifyRoles ( ParticipantCollection parties, string reason, IqCB callback, object state ) : void

Modify the roles of the parties in this list. To use, retrive a ParticipantCollection, change the roles of the parties in that collection, then pass that modified collection in here.

PrivateMessage ( string nick, string body ) : void

Sends a private message to a single user in the room.

PublicMessage ( string body ) : void

Sends a message to everyone currently in the room.

RetrieveListByAffiliation ( RoomAffiliation affiliation, RoomParticipantsEvent callback, object state ) : void

Retrieve all of the parties with a given affiliiation. Modify the affiliations of persons in this list, then call ModifyAffiliations

RetrieveListByRole ( RoomRole role, RoomParticipantsEvent callback, object state ) : void

Retrieve all of the parties with a given role. Modify the affiliations of persons in this list, then call ModifyRoles

RevokeMembership ( JID jid, string reason ) : void

Remove the membership privileges of the given user

RevokeVoice ( string nick, string reason ) : void

Disallow a user from speaking; remove their "voice".

Приватные методы

Метод Описание
ConfigForm ( object sender, IQ iq, object context ) : void
Configured ( object sender, IQ iq, object context ) : void
FinishConfigDefault ( ) : void

Finish up configuration, taking the default room config. Also known as an "Instant Room". Suitable for use if the user cancels the configuration request, perhaps.

GotList ( object sender, IQ iq, object state ) : void
OnJoinPresence ( Presence p ) : void
OnLeavePresence ( Presence p ) : void
Room ( ConferenceManager manager, JID roomAndNick ) : System

Create.

m_stream_OnAfterPresenceOut ( object sender, Presence pres ) : void

Whenver we change presence, send the new presence to the room, including caps etc.

m_stream_OnDisconect ( object sender ) : void
m_stream_OnProtocol ( object sender, System rp ) : void

Описание методов

Ban() публичный Метод

Ban a user from re-joining the room. Must be an admin.
public Ban ( JID jid, string reason ) : void
jid JID The bare JID of the user to ban
reason string The reason for the shunning
Результат void

ChangeAffiliation() публичный Метод

Change the affiliation (long-term) with the room of a user, based on their real JID.
public ChangeAffiliation ( JID jid, RoomAffiliation affiliation, string reason ) : void
jid JID The bare JID of the user of which to change the affiliation
affiliation RoomAffiliation The new affiliation
reason string The reason for the change
Результат void

ChangeRole() публичный Метод

Change the role of a user in the room, by nickname. Must be a moderator.
public ChangeRole ( string nick, RoomRole role, string reason ) : void
nick string The nickname of the user to modify.
role RoomRole The new role
reason string The reason for the change
Результат void

Configure() публичный Метод

Configures the room. OnRoomConfig MUST be set first. OnRoomConfig will be called back in the GUI thread if there is an InvokeControl on your XmppStream. Make sure that OnRoomConfig does not return until it has the answer, typically by popping up a modal dialog with the x:data form.
public Configure ( ) : void
Результат void

GrantMembership() публичный Метод

Make this user a member of the room.
public GrantMembership ( JID jid, string reason ) : void
jid JID The bare jid of the user to grant membership to.
reason string
Результат void

GrantVoice() публичный Метод

Un-mute a muted user. Give them "voice".
public GrantVoice ( string nick, string reason ) : void
nick string The nicname of the person to unmute
reason string The reason for the change
Результат void

Invite() публичный Метод

Invite a user to join the room.
public Invite ( JID invitee, string reason ) : void
invitee JID The JID of the person to invite
reason string The reason for the invite, or null for none.
Результат void

Join() публичный Метод

Joins the room. If the room is created, Configure() will be called automatically.
public Join ( ) : void
Результат void

Join() публичный Метод

Join a room, using a password.
public Join ( string password ) : void
password string
Результат void

Kick() публичный Метод

Kick the given user from the room, based on their nickname.
public Kick ( string nick, string reason ) : void
nick string The nickname of the person to kick
reason string The reason for kicking, or null for none.
Результат void

Leave() публичный Метод

Exits the room. This cleans up the entry in the ConferenceManager, as well.
public Leave ( string reason ) : void
reason string Reason for leaving the room. May be null for no reason.
Результат void

MakeModerator() публичный Метод

Make this user a moderator of the room.
public MakeModerator ( string nick ) : void
nick string The nickname of the user to change
Результат void

ModifyAffiliations() публичный Метод

Modify the roles of the parties in this list. To use, retrive a ParticipantCollection, change the roles of the parties in that collection, then pass that modified collection in here.
public ModifyAffiliations ( ParticipantCollection parties, string reason, IqCB callback, object state ) : void
parties ParticipantCollection The modified participant collection
reason string The reason for the change
callback IqCB A callback to call when complete. Will have a null IQ if there were no changes to make.
state object Caller's state information
Результат void

ModifyRoles() публичный Метод

Modify the roles of the parties in this list. To use, retrive a ParticipantCollection, change the roles of the parties in that collection, then pass that modified collection in here.
public ModifyRoles ( ParticipantCollection parties, string reason, IqCB callback, object state ) : void
parties ParticipantCollection The modified participant collection
reason string The reason for the change
callback IqCB A callback to call when complete. Will have a null IQ if there were no changes to make.
state object Caller's state information
Результат void

PrivateMessage() публичный Метод

Sends a private message to a single user in the room.
public PrivateMessage ( string nick, string body ) : void
nick string The nickname of the user to send a private message to.
body string The message body to send.
Результат void

PublicMessage() публичный Метод

Sends a message to everyone currently in the room.
public PublicMessage ( string body ) : void
body string The message text to send.
Результат void

RetrieveListByAffiliation() публичный Метод

Retrieve all of the parties with a given affiliiation. Modify the affiliations of persons in this list, then call ModifyAffiliations
public RetrieveListByAffiliation ( RoomAffiliation affiliation, RoomParticipantsEvent callback, object state ) : void
affiliation RoomAffiliation The affiliation to search for
callback RoomParticipantsEvent A callback to receive the participant list
state object Caller state information
Результат void

RetrieveListByRole() публичный Метод

Retrieve all of the parties with a given role. Modify the affiliations of persons in this list, then call ModifyRoles
public RetrieveListByRole ( RoomRole role, RoomParticipantsEvent callback, object state ) : void
role RoomRole The role to search for
callback RoomParticipantsEvent A callback to receive the participant list
state object Caller state information
Результат void

RevokeMembership() публичный Метод

Remove the membership privileges of the given user
public RevokeMembership ( JID jid, string reason ) : void
jid JID The bare jid of the user to revoke the membership of.
reason string
Результат void

RevokeVoice() публичный Метод

Disallow a user from speaking; remove their "voice".
public RevokeVoice ( string nick, string reason ) : void
nick string The nickname of the person to mute
reason string The reason for the muting
Результат void