| 4 |
* |
* |
| 5 |
* $Revision$ |
* $Revision$ |
| 6 |
* $Log$ |
* $Log$ |
| 7 |
|
* Revision 1.4 2004/11/26 06:24:53 aga |
| 8 |
|
* ・sessionのメンバにuserid_tを追加. |
| 9 |
|
* |
| 10 |
* Revision 1.3 2004/11/25 09:00:41 youi |
* Revision 1.3 2004/11/25 09:00:41 youi |
| 11 |
* get系関数にconst修飾. |
* get系関数にconst修飾. |
| 12 |
* sessionid_tをtypedefした. |
* sessionid_tをtypedefした. |
| 24 |
#define SESSION_H |
#define SESSION_H |
| 25 |
|
|
| 26 |
#include <time.h> |
#include <time.h> |
| 27 |
|
#include "common.h" |
| 28 |
|
|
| 29 |
typedef unsigned long sessionid_t; |
typedef unsigned long sessionid_t; |
| 30 |
class session{ |
class session{ |
| 32 |
unsigned long sessionID; //セッションID |
unsigned long sessionID; //セッションID |
| 33 |
unsigned long remoteHost; //リモートホストのIP |
unsigned long remoteHost; //リモートホストのIP |
| 34 |
time_t date; //セッション作成日時 |
time_t date; //セッション作成日時 |
| 35 |
|
userid_t userID; // xoops_usersのuid |
| 36 |
|
|
| 37 |
void sessionid( unsigned long remoteHost, time_t date ); |
void sessionid( unsigned long remoteHost, time_t date ); |
| 38 |
public: |
public: |
| 43 |
sessionid_t getSessionID() const; |
sessionid_t getSessionID() const; |
| 44 |
unsigned long getRemoteHost() const; |
unsigned long getRemoteHost() const; |
| 45 |
time_t getDate() const; |
time_t getDate() const; |
| 46 |
|
userid_t getUserID() const; |
| 47 |
|
|
| 48 |
void setRemoteHost( unsigned long remoteHost ); |
void setRemoteHost( unsigned long remoteHost ); |
| 49 |
void setDate( time_t date ); |
void setDate( time_t date ); |
| 50 |
void setSessionID( sessionid_t ); |
void setSessionID( sessionid_t ); |
| 51 |
|
void setUserID( userid_t ); |
| 52 |
}; |
}; |
| 53 |
|
|
| 54 |
typedef session session_t; |
typedef session session_t; |