C# Class jabber.connection.Room

Afficher le fichier Open project: codebutler/jabber-net Class Usage Examples

Private Properties

Свойство Type Description
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

Méthodes publiques

Méthode Description
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".

Private Methods

Méthode Description
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

Method Details

Ban() public méthode

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
Résultat void

ChangeAffiliation() public méthode

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
Résultat void

ChangeRole() public méthode

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
Résultat void

Configure() public méthode

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
Résultat void

GrantMembership() public méthode

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
Résultat void

GrantVoice() public méthode

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
Résultat void

Invite() public méthode

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.
Résultat void

Join() public méthode

Joins the room. If the room is created, Configure() will be called automatically.
public Join ( ) : void
Résultat void

Join() public méthode

Join a room, using a password.
public Join ( string password ) : void
password string
Résultat void

Kick() public méthode

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.
Résultat void

Leave() public méthode

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.
Résultat void

MakeModerator() public méthode

Make this user a moderator of the room.
public MakeModerator ( string nick ) : void
nick string The nickname of the user to change
Résultat void

ModifyAffiliations() public méthode

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
Résultat void

ModifyRoles() public méthode

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
Résultat void

PrivateMessage() public méthode

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.
Résultat void

PublicMessage() public méthode

Sends a message to everyone currently in the room.
public PublicMessage ( string body ) : void
body string The message text to send.
Résultat void

RetrieveListByAffiliation() public méthode

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
Résultat void

RetrieveListByRole() public méthode

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
Résultat void

RevokeMembership() public méthode

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
Résultat void

RevokeVoice() public méthode

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
Résultat void