mucroomconfighandler.h

00001 /*
00002   Copyright (c) 2006-2008 by Jakob Schroeter <js@camaya.net>
00003   This file is part of the gloox library. http://camaya.net/gloox
00004 
00005   This software is distributed under a license. The full license
00006   agreement can be found in the file LICENSE in this distribution.
00007   This software may not be copied, modified, sold or distributed
00008   other than expressed in the named license agreement.
00009 
00010   This software is distributed without any warranty.
00011 */
00012 
00013 
00014 
00015 #ifndef MUCROOMCONFIGHANDLER_H__
00016 #define MUCROOMCONFIGHANDLER_H__
00017 
00018 #include "gloox.h"
00019 
00020 #include <string>
00021 #include <list>
00022 
00023 namespace gloox
00024 {
00025 
00026   class MUCRoom;
00027 
00033   struct MUCListItem
00034   {
00035     JID *jid;                       
00036     std::string nick;               
00037     MUCRoomAffiliation affiliation; 
00038     MUCRoomRole role;               
00039     std::string reason;             
00042   };
00043 
00047   typedef std::list<MUCListItem> MUCListItemList;
00048 
00052   enum MUCOperation
00053   {
00054     RequestUniqueName,              
00055     CreateInstantRoom,              
00056     CancelRoomCreation,             
00057     RequestRoomConfig,              
00058     DestroyRoom,                    
00059     GetRoomInfo,                    
00060     GetRoomItems,                   
00061     SetRNone,                       
00062     SetVisitor,                     
00063     SetParticipant,                 
00064     SetModerator,                   
00065     SetANone,                       
00066     SetOutcast,                     
00067     SetMember,                      
00068     SetAdmin,                       
00069     SetOwner,                       
00070     RequestVoiceList,               
00071     StoreVoiceList,                 
00072     RequestBanList,                 
00073     StoreBanList,                   
00074     RequestMemberList,              
00075     StoreMemberList,                
00076     RequestModeratorList,           
00077     StoreModeratorList,             
00078     RequestOwnerList,               
00079     StoreOwnerList,                 
00080     RequestAdminList,               
00081     StoreAdminList                  
00082   };
00083 
00089   class GLOOX_API MUCRoomConfigHandler
00090   {
00091     public:
00095       virtual ~MUCRoomConfigHandler() {}
00096 
00104       virtual void handleMUCConfigList( MUCRoom *room, const MUCListItemList& items,
00105                                         MUCOperation operation ) = 0;
00106 
00114       virtual void handleMUCConfigForm( MUCRoom *room, const DataForm& form ) = 0;
00115 
00123       virtual void handleMUCConfigResult( MUCRoom *room, bool success, MUCOperation operation ) = 0;
00124 
00132       virtual void handleMUCRequest( MUCRoom *room, const DataForm& form ) = 0;
00133 
00134   };
00135 
00136 }
00137 
00138 #endif // MUCROOMCONFIGHANDLER_H__

Generated on Sun Apr 27 11:08:13 2008 for gloox by  doxygen 1.5.5