DCL
3.7.4
Loading...
Searching...
No Matches
EShopSession.h
Go to the documentation of this file.
1
#ifndef __ESHOP_SESSION_H__
2
#define __ESHOP_SESSION_H__ 20041207
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
__strSessionID
; }
29
int
userID
()
const
{
return
__nUserID
; }
30
int
groupID
()
const
{
return
__nGroupID
; }
31
const
String&
userName
()
const
{
return
__strUserName
; }
32
bool
isAdmin
()
const
{
return
__nGroupID
== 1; }
33
bool
isGuest
()
const
{
return
__nUserID
== 2; }
34
int
command
()
const
{
return
__nCommand
; }
35
void
setCommand
(
int
nCM) {
__nCommand
= nCM; }
36
37
SQLConnection
*
SQLConn
()
const
{
return
__pSQLConn
; }
38
39
protected
:
40
String
__strSessionID
;
41
int
__nCommand
;
42
int
__nUserID
;
43
int
__nGroupID
;
44
String
__strUserName
;
45
46
SQLConnection
*
__pSQLConn
;
47
};
48
49
__DCL_END_NAMESPACE
50
51
#endif
// __ESHOP_SESSION_H__
__DCL_THROWS1
#define __DCL_THROWS1(e)
Definition
Config.h:152
EShopServlet
Definition
EShopServlet.h:21
EShopSession::__nGroupID
int __nGroupID
Definition
EShopSession.h:43
EShopSession::userName
const String & userName() const
Definition
EShopSession.h:31
EShopSession::sessionID
const String & sessionID() const
Definition
EShopSession.h:28
EShopSession::__pSQLConn
SQLConnection * __pSQLConn
Definition
EShopSession.h:46
EShopSession::login
bool login(ListedStringToStringArrayMap ¶ms)
Definition
EShopSession.cpp:118
EShopSession::__strSessionID
String __strSessionID
Definition
EShopSession.h:40
EShopSession::logout
void logout()
Definition
EShopSession.cpp:180
EShopSession::__nUserID
int __nUserID
Definition
EShopSession.h:42
EShopSession::__nCommand
int __nCommand
Definition
EShopSession.h:41
EShopSession::onViewSessions
void onViewSessions(ListedStringToStringArrayMap ¶ms, Writer &out, const String &strMainCommand, int nMainCommandID, const String &strCommandID, const EShopServlet &_servlet)
Definition
EShopSession.cpp:207
EShopSession::__strUserName
String __strUserName
Definition
EShopSession.h:44
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::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:22
SQLConnection
Definition
SQL.h:312
SQLException
Definition
SQL.h:386
Writer
Definition
Writer.h:31
hse
HSAEShop
EShopSession.h
Generated by
1.14.0