DCL
4.0
Loading...
Searching...
No Matches
EShopSession.h
Go to the documentation of this file.
1
#ifndef __ESHOP_SESSION_H__
2
#define __ESHOP_SESSION_H__
3
4
__DCL_BEGIN_NAMESPACE
5
6
class
EShopServlet
;
7
8
class
EShopSession
9
{
10
public
:
11
EShopSession
(
12
HttpServletContextEx
& ctx,
13
SQLConnection
* pSQLConn
14
)
__DCL_THROWS1
(
SQLException
*);
15
16
bool
login
(ListedStringToStringArrayMap& params);
17
void
logout
();
18
19
void
onViewSessions
(
20
ListedStringToStringArrayMap& params,
21
Writer
& out,
22
const
String& strMainCommand,
23
int
nMainCommandID,
24
const
String& strCommandID,
25
const
EShopServlet
& _servlet
26
);
27
28
const
String&
sessionID
()
const
{
return
m_strSessionID
; }
29
int
userID
()
const
{
return
m_nUserID
; }
30
int
groupID
()
const
{
return
m_nGroupID
; }
31
const
String&
userName
()
const
{
return
m_strUserName
; }
32
bool
isAdmin
()
const
{
return
m_nGroupID
== 1; }
33
bool
isGuest
()
const
{
return
m_nUserID
== 2; }
34
int
command
()
const
{
return
m_nCommand
; }
35
void
setCommand
(
int
nCM) {
m_nCommand
= nCM; }
36
37
SQLConnection
*
SQLConn
()
const
{
return
m_pSQLConn
; }
38
39
protected
:
40
String
m_strSessionID
;
41
int
m_nCommand
;
42
int
m_nUserID
;
43
int
m_nGroupID
;
44
String
m_strUserName
;
45
46
SQLConnection
*
m_pSQLConn
;
47
};
48
49
__DCL_END_NAMESPACE
50
51
#endif
// __ESHOP_SESSION_H__
__DCL_THROWS1
#define __DCL_THROWS1(e)
Definition
Config.h:167
EShopServlet
Definition
EShopServlet.h:21
EShopSession::userName
const String & userName() const
Definition
EShopSession.h:31
EShopSession::sessionID
const String & sessionID() const
Definition
EShopSession.h:28
EShopSession::m_strSessionID
String m_strSessionID
Definition
EShopSession.h:40
EShopSession::m_strUserName
String m_strUserName
Definition
EShopSession.h:44
EShopSession::m_pSQLConn
SQLConnection * m_pSQLConn
Definition
EShopSession.h:46
EShopSession::login
bool login(ListedStringToStringArrayMap ¶ms)
Definition
EShopSession.cpp:118
EShopSession::logout
void logout()
Definition
EShopSession.cpp:180
EShopSession::onViewSessions
void onViewSessions(ListedStringToStringArrayMap ¶ms, Writer &out, const String &strMainCommand, int nMainCommandID, const String &strCommandID, const EShopServlet &_servlet)
Definition
EShopSession.cpp:208
EShopSession::m_nUserID
int m_nUserID
Definition
EShopSession.h:42
EShopSession::setCommand
void setCommand(int nCM)
Definition
EShopSession.h:35
EShopSession::isGuest
bool isGuest() const
Definition
EShopSession.h:33
EShopSession::SQLConn
SQLConnection * SQLConn() const
Definition
EShopSession.h:37
EShopSession::userID
int userID() const
Definition
EShopSession.h:29
EShopSession::m_nCommand
int m_nCommand
Definition
EShopSession.h:41
EShopSession::m_nGroupID
int m_nGroupID
Definition
EShopSession.h:43
EShopSession::groupID
int groupID() const
Definition
EShopSession.h:30
EShopSession::isAdmin
bool isAdmin() const
Definition
EShopSession.h:32
EShopSession::command
int command() const
Definition
EShopSession.h:34
EShopSession::EShopSession
EShopSession(HttpServletContextEx &ctx, SQLConnection *pSQLConn) __DCL_THROWS1(SQLException *)
Definition
EShopSession.cpp:22
HttpServletContextEx
Definition
HttpServletEx.h:23
SQLConnection
Definition
SQL.h:305
SQLException
Definition
SQL.h:382
Writer
Definition
Writer.h:31
hse
HSAEShop
EShopSession.h
Generated by
1.14.0