Develop and Download Open Source Software

Browse CVS Repository

Contents of /xoonips/AL/session.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Fri Nov 26 06:24:53 2004 UTC (19 years, 4 months ago) by aga
Branch: MAIN
Changes since 1.2: +11 -1 lines
File MIME type: text/x-c++src
・sessionのメンバにuserid_tを追加.

1 /*
2 *
3 * ?祉???激?с?括??????????鴻???臂?/span>
4 *
5 * $Revision: 1.2 $
6 * $Log: session.cc,v $
7 * Revision 1.2 2004/11/25 09:00:24 youi
8 * get膤脂?∽?違??onst篆??.
9 *
10 * Revision 1.1 2004/11/24 06:54:04 youi
11 * initial version
12 *
13 *
14 */
15
16 #include <stdlib.h>
17
18 #include "session.h"
19
20 session::session()
21 {
22 sessionID = 0;
23 remoteHost = 0;
24 date = 0;
25 userID = 0;
26 }
27
28 session::session( unsigned long remoteHost, time_t date )
29 {
30 this -> remoteHost = remoteHost;
31 this -> date = date;
32
33 sessionid( remoteHost, date );
34 }
35
36 session::~session(){}
37
38 unsigned long session::getSessionID() const { return sessionID; }
39 unsigned long session::getRemoteHost() const { return remoteHost; }
40 time_t session::getDate() const { return date; }
41 userid_t session::getUserID() const { return userID; }
42
43 void session::setRemoteHost( unsigned long remoteHost )
44 {
45 this -> remoteHost = remoteHost;
46 sessionid( remoteHost, date );
47 }
48 void session::setDate( time_t date )
49 {
50 this -> date = date;
51 sessionid( remoteHost, date );
52 }
53
54 void session::sessionid( unsigned long remoteHost, time_t date )
55 {
56 srand( time( NULL ) );
57 sessionID = remoteHost ^ date ^ rand( );
58 }
59
60 void session::setSessionID( sessionid_t id )
61 {
62 this -> sessionID = id;
63 }
64
65 void session::setUserID( userid_t uid )
66 {
67 this -> userID = uid;
68 }
69

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26