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.6 - (hide annotations) (download) (as text)
Thu Jan 6 07:24:07 2005 UTC (19 years, 3 months ago) by youi
Branch: MAIN
CVS Tags: mv_to_sourceforge_20050217, demo20050128
Changes since 1.5: +6 -3 lines
File MIME type: text/x-c++src
getUserIDをgetUIDに,setUserIDをsetUIDに改名した.

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

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