Back to index

im-sdk  12.3.91
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
IMConnection Class Reference

#include <IMConnection.hh>

Inheritance diagram for IMConnection:
Inheritance graph
[legend]
Collaboration diagram for IMConnection:
Collaboration graph
[legend]

List of all members.

Public Types

enum  CLIENTINFO_ATTR {
  CLIENT_NAME, OS_NAME, OS_ARCH, OS_VERSION,
  X_DISPLAY_NAME, X_SERVER_VENDOR
}
typedef list< ClientAttrClientAttrList

Public Member Functions

IMUserget_user ()
IMDesktopget_desktop ()
IMSvrget_imsvr ()
const string & get_hostname () const
 IMConnection (IMSvr *pimsvr, IMUser *user, const string &hostname)
virtual bool set_client_info (const IMHandler::ClientAttrList &attrlist)
virtual bool get_triggerkeys (IMKeySpecList &onkeys, IMKeySpecList &offkeys)
virtual const IMLangListget_langlist (iml_desktop_t *)
virtual const
IMObjectWithDescList
get_imobjectdesclist ()
virtual IMHotkeyProfileStructget_hotkey_profiles (int *count_profiles)
virtual const IMDescriptorListget_imdesclist (iml_desktop_t *)
virtual const bool update_imdesclist (IMLEName *LEname, IMLocale *Locales, int nLocales)
virtual const IMObjectget_imobject (int attribid)
virtual ICHandlercreateic (ICAttribute &icattr)
virtual void destroy ()

Protected Member Functions

virtual ~IMConnection ()

Private Member Functions

LEMgrget_lemgr ()

Private Attributes

IMUserpuser
IMDesktoppdesktop
IMSvrpimsvr
string hostname

Detailed Description

Definition at line 11 of file IMConnection.hh.


Member Typedef Documentation

Definition at line 30 of file IMHandler.hh.


Member Enumeration Documentation

enum IMHandler::CLIENTINFO_ATTR [inherited]
Enumerator:
CLIENT_NAME 
OS_NAME 
OS_ARCH 
OS_VERSION 
X_DISPLAY_NAME 
X_SERVER_VENDOR 

Definition at line 14 of file IMHandler.hh.


Constructor & Destructor Documentation

IMConnection::IMConnection ( IMSvr pimsvr,
IMUser user,
const string &  hostname 
)

Definition at line 148 of file IMConnection.cpp.

{
    pimsvr = x_pimsvr;
    pdesktop = NULL;
    puser = x_puser;
    hostname = x_hostname;
    pdesktop = NULL;
}
IMConnection::~IMConnection ( ) [protected, virtual]

Definition at line 161 of file IMConnection.cpp.

{
}

Member Function Documentation

ICHandler * IMConnection::createic ( ICAttribute icattr) [virtual]

Implements IMHandler.

Definition at line 135 of file IMConnection.cpp.

{
    IMInputContext *pic = new IMInputContext(this, icattr);

    // memory error.
    if (!pic) return NULL;

    return pic;
}
virtual void IMConnection::destroy ( ) [inline, virtual]

Implements IMHandler.

Definition at line 61 of file IMConnection.hh.

    { delete this; }

Definition at line 10 of file IMConnection.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const string& IMConnection::get_hostname ( ) const [inline]

Definition at line 27 of file IMConnection.hh.

    { return hostname; }

Here is the caller graph for this function:

IMHotkeyProfileStruct * IMConnection::get_hotkey_profiles ( int *  count_profiles) [virtual]

Implements IMHandler.

Definition at line 103 of file IMConnection.cpp.

{
  return get_lemgr()->get_hotkey_profiles(count_profiles);
}

Here is the call graph for this function:

const IMDescriptorList * IMConnection::get_imdesclist ( iml_desktop_t curr_desktop) [virtual]

Implements IMHandler.

Definition at line 109 of file IMConnection.cpp.

{
    return get_lemgr()->get_all_imdesclist(curr_desktop);
}

Here is the call graph for this function:

const IMObject * IMConnection::get_imobject ( int  attribid) [virtual]

Implements IMHandler.

Definition at line 127 of file IMConnection.cpp.

{
    return NULL;
}

Implements IMHandler.

Definition at line 97 of file IMConnection.cpp.

Here is the call graph for this function:

Definition at line 25 of file IMConnection.hh.

    { return pimsvr; }

Here is the caller graph for this function:

const IMLangList * IMConnection::get_langlist ( iml_desktop_t curr_desktop) [virtual]

Implements IMHandler.

Definition at line 89 of file IMConnection.cpp.

{
    return get_lemgr()->get_all_langlist(curr_desktop);
}

Here is the call graph for this function:

LEMgr* IMConnection::get_lemgr ( ) [inline, private]

Definition at line 18 of file IMConnection.hh.

    { return pimsvr->get_lemgr(); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool IMConnection::get_triggerkeys ( IMKeySpecList onkeys,
IMKeySpecList offkeys 
) [virtual]

Implements IMHandler.

Definition at line 65 of file IMConnection.cpp.

{
    IMKeySpec default_key(' ', ' ', 2, 0);

    const IMKeySpecList& ckeys = get_imsvr()->get_conversionkeys();
    if (ckeys.size() > 0) {
        for (IMKeySpecList::const_iterator it = ckeys.begin();
             it != ckeys.end();
             ++it) {
            onkeys.push_back(*it);
            offkeys.push_back(*it);
        }
    } else {
       onkeys.push_back(default_key);
       offkeys.push_back(default_key);
    }

    return true;
}

Here is the call graph for this function:

Definition at line 22 of file IMConnection.hh.

    { return puser; }
bool IMConnection::set_client_info ( const IMHandler::ClientAttrList attrlist) [virtual]

Implements IMHandler.

Definition at line 26 of file IMConnection.cpp.

{
    IMDesktop::IMDesktopAttr a;
    IMHandler::ClientAttrList::const_iterator it;

    a[IMDesktop::CLIENT_HOST] = u16string(get_hostname());
    for (it = attrlist.begin(); it != attrlist.end(); it++) {
       switch (it->attr) {
         case IMHandler::CLIENT_NAME:
          a[IMDesktop::CLIENT_NAME] = it->val;
          break;
         case IMHandler::OS_NAME:
          a[IMDesktop::OS_NAME] = it->val;
          break;
         case IMHandler::OS_ARCH:
          a[IMDesktop::OS_ARCH] = it->val;
          break;
         case IMHandler::OS_VERSION:
          a[IMDesktop::OS_VERSION] = it->val;
          break;
         case IMHandler::X_DISPLAY_NAME:
          a[IMDesktop::X_DISPLAY_NAME] = it->val;
          break;
         case IMHandler::X_SERVER_VENDOR:
          a[IMDesktop::X_SERVER_VENDOR] = it->val;
          break;
         default:
          // simply ignore it.
          break;
       }
    }
    pdesktop = puser->request_desktop(a);

    return true;
}

Here is the call graph for this function:

const bool IMConnection::update_imdesclist ( IMLEName LEname,
IMLocale Locales,
int  nLocales 
) [virtual]

Implements IMHandler.

Definition at line 117 of file IMConnection.cpp.

{
    return get_lemgr()->update_imdesclist(LEname, Locales, nLocales);
}

Here is the call graph for this function:


Member Data Documentation

string IMConnection::hostname [private]

Definition at line 16 of file IMConnection.hh.

Definition at line 14 of file IMConnection.hh.

Definition at line 15 of file IMConnection.hh.

Definition at line 13 of file IMConnection.hh.


The documentation for this class was generated from the following files: