Back to index

im-sdk  12.3.91
IMUser.hh
Go to the documentation of this file.
00001 #ifndef IMUSER_HH_
00002 #define IMUSER_HH_
00003 #include <string>
00004 #include <list>
00005 #include <functional>
00006 #include "basictype.hh"
00007 #include "IMDesktop.hh"
00008 
00009 class IMConnection;
00010 
00011 class IMUser
00012 {
00013     u16string username;
00014     // int realid;
00015 
00016     typedef list<IMDesktop*> IMDesktopList;
00017     IMDesktopList desklist;
00018 
00019     // Special connection per user usually allocated
00020     // by IIIMXCF X backend client(aka. iiim_xbe).
00021     IMConnection* paux_proxy_connection;
00022 
00023   public:
00024     IMDesktop* request_desktop(
00025        IMDesktop::IMDesktopAttr &attr
00026     );
00027     const u16string& get_username() const
00028     { return username; }
00029 
00030     IMUser(const u16string &username);
00031     ~IMUser();
00032 
00033   friend class IMUserMgr;
00034 };
00035 
00036 struct Functor_IMUser_username :
00037     public binary_function<IMUser*, IMUser*, bool> {
00038     bool operator()(
00039        const IMUser *pu1,
00040        const IMUser *pu2
00041     ) const
00042     {
00043        return pu1->get_username().compare(pu2->get_username()) < 0;
00044     }
00045 };
00046 
00047 #endif /* not IMUSER_HH_ */
00048 
00049 /* Local Variables: */
00050 /* c-file-style: "iiim-project" */
00051 /* End: */