SOL9 2.0 Class: SessionInfo

 SOL9 C++ Class Library  SOL9 Samples  SOL9 Tutorial  SOL9 FAQ  SOL9 ClassTree 

Source code

/*
 * SessionInfo.h 
 * Copyright (c) 2011 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


#pragma once

#include <sol/nm/NetInfo.h>

namespace SOL {

class SessionInfo: public NetInfo {

public:
    /**
     * Constructor
     */
    SessionInfo(int lv=0)
    :NetInfo(lv)
    {
    }

public:
    /**
     * Destructor
     */
    ~SessionInfo()
    {
    }

public:
    const wchar_t* getUserFlags(DWORD flag) 
    {
        static const ArgT<wchar_t> types[] = {
            {L"GUEST", SESS_GUEST},             //The user using a guest account. 
            {L"NOENCRYPTION", SESS_NOENCRYPTION},    //The session without using password encryption.
        };
        int count = XtNumber(types);
        const wchar_t* name = L"";
        for (int i = 0; i<count; i++) {
            if (types[i].value == flag) {
                name = types[i].name;
            }
        }
        return name;
    }
};

}

Last modified: 1 Feb 2012

Copyright (c) 2009-2012 Antillia.com ALL RIGHTS RESERVED.