ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/include/sourceinfo.h
Revision: 1.3
Committed: Tue Aug 28 17:08:07 2007 UTC (16 years, 9 months ago) by pippijn
Content type: text/plain
Branch: MAIN
Changes since 1.2: +5 -5 lines
Log Message:
- changed name
- updated the example config to the new system
- added more documentation
- enhanced documentation generators
- added a link to the pdf to the website
- added an RSS feed generator
- transitioned hooks to c++ callbacks
- did various merges with upstream along the way
- added const where appropriate
- removed the old block allocator
- fixed most memory leaks
- transitioned some dictionaries to std::map
- transitioned some lists to std::vector
- made some free functions members where appropriate
- renamed string to dynstr and added a static string ststr
- use NOW instead of time (NULL) if possible
- completely reworked database backends, crypto handlers and protocol handlers
  to use an object factory
- removed the old module system. ermyth does not do any dynamic loading anymore
- fixed most of the build system
- reworked how protocol commands work

File Contents

# User Rev Content
1 pippijn 1.1 /*
2 pippijn 1.3 * Copyright © 2006 Atheme Development Group
3 pippijn 1.2 * Rights to this code are as documented in doc/pod/license.pod.
4 pippijn 1.1 *
5     * Data structures for sourceinfo
6     *
7 pippijn 1.3 * $Id: sourceinfo.h,v 1.2 2007-07-21 01:29:07 pippijn Exp $
8 pippijn 1.1 */
9    
10     #ifndef SOURCEINFO_H
11     #define SOURCEINFO_H
12    
13     struct sourceinfo_vtable
14     {
15     const char *description;
16 pippijn 1.3 void (*cmd_fail) (sourceinfo_t *si, faultcode_t code, char const * const message);
17     void (*cmd_success_nodata) (sourceinfo_t *si, char const * const message);
18     void (*cmd_success_string) (sourceinfo_t *si, char const * const result, char const * const message);
19 pippijn 1.1 };
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