Develop and Download Open Source Software

Browse CVS Repository

Annotation of /xoonips/AL/session.cc

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


Revision 1.3 - (hide 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 youi 1.1 /*
2     *
3     * ?祉???激?с?括??????????鴻???臂?/span>
4     *
5 aga 1.3 * $Revision: 1.2 $
6 youi 1.2 * $Log: session.cc,v $
7 aga 1.3 * Revision 1.2 2004/11/25 09:00:24 youi
8     * get膤脂?∽?違??onst篆??.
9     *
10 youi 1.2 * Revision 1.1 2004/11/24 06:54:04 youi
11     * initial version
12     *
13 youi 1.1 *
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 aga 1.3 userID = 0;
26 youi 1.1 }
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 youi 1.2 unsigned long session::getSessionID() const { return sessionID; }
39     unsigned long session::getRemoteHost() const { return remoteHost; }
40     time_t session::getDate() const { return date; }
41 aga 1.3 userid_t session::getUserID() const { return userID; }
42 youi 1.1
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 youi 1.2
60     void session::setSessionID( sessionid_t id )
61     {
62     this -> sessionID = id;
63 aga 1.3 }
64    
65     void session::setUserID( userid_t uid )
66     {
67     this -> userID = uid;
68 youi 1.2 }
69    

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