ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/include/sourceinfo.h
Revision: 1.1
Committed: Thu Jul 19 08:24:50 2007 UTC (16 years, 10 months ago) by pippijn
Content type: text/plain
Branch: MAIN
Log Message:
initial import. the most important changes since Atheme are:
- fixed many memory leaks
- fixed many bugs
- converted to C++ and use more STL containers
- added a (not very enhanced yet) perl module
- greatly improved XML-RPC speed
- added a JSON-RPC module with code from json-cpp
- added a valgrind memcheck module to operserv
- added a more object oriented base64 implementation
- added a specialised unit test framework
- improved stability
- use gettimeofday() if available
- reworked adding/removing commands
- MemoServ IGNORE DEL can now remove indices

File Contents

# Content
1 /*
2 * Copyright © 2006 Atheme Development Group
3 * Rights to this code are as documented in doc/LICENSE.
4 *
5 * Data structures for sourceinfo
6 *
7 * $Id: sourceinfo.h 7779 2007-03-03 13:55:42Z pippijn $
8 */
9
10 #ifndef SOURCEINFO_H
11 #define SOURCEINFO_H
12
13 struct sourceinfo_vtable
14 {
15 const char *description;
16 void (*cmd_fail) (sourceinfo_t *si, faultcode_t code, const char *message);
17 void (*cmd_success_nodata) (sourceinfo_t *si, const char *message);
18 void (*cmd_success_string) (sourceinfo_t *si, const char *result, const char *message);
19 };
20
21 /* structure describing data about a protocol message or service command */
22 struct sourceinfo_t
23 {
24 /* fields describing the source of the message */
25 /* for protocol modules, the following applies to su and s:
26 * at most one of these two can be non-NULL
27 * before server registration, both are NULL, otherwise exactly
28 * one is NULL.
29 * for services commands, s is always NULL and su is non-NULL if
30 * and only if the command was received via IRC.
31 */
32 user_t *su; /* source, if it's a user */
33 server_t *s; /* source, if it's a server */
34
35 connection_t *connection; /* physical connection cmd received from */
36 const char *sourcedesc; /* additional information (e.g. IP address) */
37 myuser_t *smu; /* login associated with source */
38
39 service_t *service; /* destination service */
40
41 channel_t *c; /* channel this command applies to (fantasy?) */
42
43 struct sourceinfo_vtable *v; /* function pointers, could be NULL */
44 void *callerdata; /* opaque data pointer for caller */
45 };
46
47 #endif