events.h
Go to the documentation of this file.
1 /* Copyright (C) 2000-2006 Thomas Bopp, Thorsten Hampel, Ludger Merkens
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * $Id: events.h,v 1.1 2008/03/31 13:39:57 exodusd Exp $
18  */
19 
20 #ifndef _EVENT_H
21 #define _EVENT_H
22 
23 #define EVENT_ERROR -1
24 #define EVENT_BLOCKED 0
25 #define EVENT_OK 1
26 
27 #define EVENTS_SERVER 0x00000000
28 #define EVENTS_USER 0xf0000000
29 #define EVENTS_MODULES 0x10000000
30 #define EVENTS_MONITORED 0x20000000
31 #define EVENTS_SECOND 0x40000000
32 
33 #define EVENT_MASK 0xffffffff - EVENTS_MONITORED
34 
35 
36 #define EVENT_ENTER_INVENTORY 1
37 #define EVENT_LEAVE_INVENTORY 2
38 #define EVENT_UPLOAD 4
39 #define EVENT_DOWNLOAD 8
40 #define EVENT_ATTRIBUTES_CHANGE 16
41 #define EVENT_MOVE 32
42 #define EVENT_SAY 64
43 #define EVENT_TELL 128
44 #define EVENT_LOGIN 256
45 #define EVENT_LOGOUT 512
46 #define EVENT_ATTRIBUTES_LOCK 1024
47 #define EVENT_EXECUTE 2048 // scripts and the like
48 #define EVENT_REGISTER_FACTORY 4096
49 #define EVENT_REGISTER_MODULE 8192
50 #define EVENT_ATTRIBUTES_ACQUIRE 16384
51 #define EVENT_ATTRIBUTES_QUERY 32768
52 #define EVENT_REGISTER_ATTRIBUTE 65536
53 #define EVENT_DELETE 131072
54 #define EVENT_ADD_MEMBER 262144
55 #define EVENT_REMOVE_MEMBER 524288
56 #define EVENT_GRP_ADD_PERMISSION 1048576
57 #define EVENT_USER_CHANGE_PW 2097152
58 #define EVENT_SANCTION 4194304
59 #define EVENT_SANCTION_META 8388608
60 #define EVENT_ARRANGE_OBJECT (1<<24)
61 #define EVENT_ANNOTATE (1<<25)
62 #define EVENT_LISTEN_EVENT (1<<26)
63 #define EVENT_IGNORE_EVENT (1<<27)
64 
65 #define EVENT_GET_INVENTORY (1|EVENTS_SECOND)
66 #define EVENT_DUPLICATE (2|EVENTS_SECOND)
67 #define EVENT_REQ_SAVE (4|EVENTS_SECOND)
68 #define EVENT_GRP_ADDMUTUAL (8|EVENTS_SECOND)
69 #define EVENT_REF_GONE (16|EVENTS_SECOND)
70 #define EVENT_STATUS_CHANGED (32|EVENTS_SECOND)
71 #define EVENT_SAVE_OBJECT (64|EVENTS_SECOND)
72 #define EVENT_REMOVE_ANNOTATION (128|EVENTS_SECOND)
73 #define EVENT_DOWNLOAD_FINISHED (256|EVENTS_SECOND)
74 #define EVENT_LOCK (512|EVENTS_SECOND)
75 #define EVENT_USER_JOIN_GROUP (1024|EVENTS_SECOND)
76 #define EVENT_USER_LEAVE_GROUP (2048|EVENTS_SECOND)
77 #define EVENT_UNLOCK (4096|EVENTS_SECOND)
78 #define EVENT_DECORATE (8192|EVENTS_SECOND)
79 #define EVENT_REMOVE_DECORATION (16384|EVENTS_SECOND)
80 
81 #define EVENT_USER_NEW_TICKET (EVENT_USER_CHANGE_PW|EVENTS_SECOND)
82 
83 #define EVENTS_OBSERVE (EVENT_SAY|EVENT_ENTER_INVENTORY|EVENT_LEAVE_INVENTORY)
84 
85 #define EVENT_DB_REGISTER EVENTS_MODULES | 1 << 1
86 #define EVENT_DB_UNREGISTER EVENTS_MODULES | 1 << 2
87 #define EVENT_DB_QUERY EVENTS_MODULES | 1 << 3
88 #define EVENT_SERVER_SHUTDOWN EVENTS_MODULES | 1 << 4
89 #define EVENT_CHANGE_QUOTA EVENTS_MODULES | 1 << 5
90 
91 #define PHASE_BLOCK 1
92 #define PHASE_NOTIFY 2
93 
94 #define _EVENT_FUNC 0
95 #define _EVENT_ID 1
96 #define _EVENT_PHASE 2
97 #define _EVENT_OBJECT 3
98 
99 #define _MY_EVENT_ID 0
100 #define _MY_EVENT_NUM 1
101 
102 #endif