C# 클래스 jabber.connection.Room

파일 보기 프로젝트 열기: codebutler/jabber-net 1 사용 예제들

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