Develop and Download Open Source Software

Browse CVS Repository

Annotation of /xoonips/AL/event.h

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


Revision 1.1 - (hide annotations) (download) (as text)
Thu Jun 23 07:58:12 2005 UTC (18 years, 9 months ago) by aga4096
Branch: MAIN
File MIME type: text/x-chdr
・イベントログ機能の追加.

1 aga4096 1.1 /*
2     * --------------------------------------------------------------------------
3     * XooNiPs Xoops modules for Neuroinformatics Platforms
4     * Copyright (C) 2005 RIKEN, Japan. All rights reserved.
5     * http://sourceforge.jp/projects/xoonips/
6     * --------------------------------------------------------------------------
7     * This program is free software; you can redistribute it and/or
8     * modify it under the terms of the GNU General Public License
9     * as published by the Free Software Foundation; either version 2
10     * of the License, or (at your option) any later version.
11     *
12     * This program is distributed in the hope that it will be useful,
13     * but WITHOUT ANY WARRANTY; without even the implied warranty of
14     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     * GNU General Public License for more details.
16     *
17     * You should have received a copy of the GNU General Public License
18     * along with this program; if not, write to the Free Software
19     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20     * --------------------------------------------------------------------------
21     *
22     *
23     * 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
24     *
25     * $Revision$
26     */
27    
28     #if !defined( EVENT_H )
29     #define EVENT_H
30    
31     #include "common.h"
32     #include "account.h"
33     #include "group.h"
34     #include "item.h"
35     #include "index.h"
36    
37     typedef unsigned int eventid_t;
38     typedef unsigned int eventtypeid_t;
39     typedef unsigned int fileid_t;
40    
41     class event {
42     private:
43     eventid_t eventID ;
44     eventtypeid_t eventTypeID ;
45     time_t timestamp ;
46     userid_t execUID ;
47     indexid_t indexID ;
48     itemid_t itemID ;
49     fileid_t fileID ;
50     userid_t uid ;
51     groupid_t gid ;
52     char* remoteHost ;
53     char* searchKeyword;
54     char* loginName ;
55     const static int validFields[][10];
56     public:
57     const static eventtypeid_t ETID_INVALID_ETID = 0;
58     const static eventtypeid_t ETID_LOGIN_FAILURE = 1;
59     const static eventtypeid_t ETID_LOGIN_SUCCESS = 2;
60     const static eventtypeid_t ETID_LOGOUT = 3;
61     const static eventtypeid_t ETID_INSERT_ITEM = 4;
62     const static eventtypeid_t ETID_UPDATE_ITEM = 5;
63     const static eventtypeid_t ETID_DELETE_ITEM = 6;
64     const static eventtypeid_t ETID_VIEW_ITEM = 7;
65     const static eventtypeid_t ETID_DOWNLOAD_FILE = 8;
66     const static eventtypeid_t ETID_REQUEST_CERTIFY_ITEM = 9;
67     const static eventtypeid_t ETID_INSERT_INDEX = 10;
68     const static eventtypeid_t ETID_UPDATE_INDEX = 11;
69     const static eventtypeid_t ETID_DELETE_INDEX = 12;
70     const static eventtypeid_t ETID_CERTIFY_ITEM = 13;
71     const static eventtypeid_t ETID_REJECT_ITEM = 14;
72     const static eventtypeid_t ETID_REQUEST_INSERT_ACCOUNT = 15;
73     const static eventtypeid_t ETID_CERTIFY_ACCOUNT = 16;
74     const static eventtypeid_t ETID_INSERT_GROUP = 17;
75     const static eventtypeid_t ETID_UPDATE_GROUP = 18;
76     const static eventtypeid_t ETID_DELETE_GROUP = 19;
77     const static eventtypeid_t ETID_INSERT_GROUP_MEMBER = 20;
78     const static eventtypeid_t ETID_DELETE_GROUP_MEMBER = 21;
79     const static eventtypeid_t ETID_VIEW_TOP_PAGE = 22;
80     const static eventtypeid_t ETID_QUICK_SEARCH = 23;
81     const static eventtypeid_t ETID_ADVANCED_SEARCH = 24;
82     const static eventtypeid_t ETID_MAX = 24;
83    
84     event();
85     ~event();
86    
87     eventid_t getEventID () const;
88     eventtypeid_t getEventTypeID () const;
89     time_t getTimestamp () const;
90     userid_t getExecUID () const;
91     indexid_t getIndexID () const;
92     itemid_t getItemID () const;
93     fileid_t getFileID () const;
94     userid_t getUID () const;
95     groupid_t getGID () const;
96     const char* getRemoteHost () const;
97     const char* getSearchKeyword() const;
98     const char* getLoginName () const;
99    
100     void setEventID ( eventid_t x );
101     void setEventTypeID ( eventtypeid_t x );
102     void setTimestamp ( time_t x );
103     void setExecUID ( userid_t x );
104     void setIndexID ( indexid_t x );
105     void setItemID ( itemid_t x );
106     void setFileID ( fileid_t x );
107     void setUID ( userid_t x );
108     void setGID ( groupid_t x );
109     void setRemoteHost ( const char* x );
110     void setSearchKeyword ( const char* x );
111     void setLoginName ( const char* x );
112    
113     // eventTypeID鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申NULL鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
114     bool isValidTimestamp () const;
115     bool isValidExecUID () const;
116     bool isValidIndexID () const;
117     bool isValidItemID () const;
118     bool isValidFileID () const;
119     bool isValidUID () const;
120     bool isValidGID () const;
121     bool isValidRemoteHost () const;
122     bool isValidSearchKeyword() const;
123     bool isValidLoginName () const;
124     };
125    
126     typedef class event event_t;
127    
128     #endif

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