Update doxygen setup and fix some of the bad bits of documentation.

This commit is contained in:
alexhudson
2008-04-12 13:40:18 +00:00
parent 743d39e8c9
commit b4a2c683aa
8 changed files with 189 additions and 125 deletions
+56 -46
View File
@@ -1,4 +1,4 @@
# Doxyfile 1.4.7
# Doxyfile 1.5.2
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project
@@ -14,6 +14,14 @@
# Project related configuration options
#---------------------------------------------------------------------------
# This tag specifies the encoding used for all characters in the config file that
# follow. The default is UTF-8 which is also the encoding used for all text before
# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into
# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of
# possible encodings.
DOXYFILE_ENCODING = UTF-8
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
@@ -30,7 +38,7 @@ PROJECT_NUMBER = 0.1.0
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
OUTPUT_DIRECTORY = ./doxygen/
OUTPUT_DIRECTORY = ./doxygen/
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
@@ -45,24 +53,14 @@ CREATE_SUBDIRS = NO
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all constant output in the proper language.
# The default language is English, other supported languages are:
# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,
# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,
# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,
# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
# Swedish, and Ukrainian.
# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian,
# Italian, Japanese, Japanese-en (Japanese with English messages), Korean,
# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
OUTPUT_LANGUAGE = English
# This tag can be used to specify the encoding used in the generated output.
# The encoding is not always determined by the language that is chosen,
# but also whether or not the output is meant for Windows or non-Windows users.
# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
# forces the Windows encoding (this is the default for the Windows binary),
# whereas setting the tag to NO uses a Unix-style encoding (the default for
# all platforms other than Windows).
USE_WINDOWS_ENCODING = NO
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
# include brief member descriptions after the members that are listed in
# the file and class documentation (similar to JavaDoc).
@@ -204,6 +202,11 @@ OPTIMIZE_OUTPUT_JAVA = NO
BUILTIN_STL_SUPPORT = NO
# If you use Microsoft's C++/CLI language, you should set this option to YES to
# enable parsing support.
CPP_CLI_SUPPORT = NO
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
# tag is set to YES, then doxygen will reuse the documentation of the first
# member in the group (if any) for the other members of the group. By default
@@ -459,7 +462,15 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = ./src/ ./include/
INPUT = ./src/ \
./include/
# This tag can be used to specify the character encoding of the source files that
# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default
# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding.
# See http://www.gnu.org/software/libiconv for the list of possible encodings.
INPUT_ENCODING = UTF-8
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
@@ -468,7 +479,11 @@ INPUT = ./src/ ./include/
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
FILE_PATTERNS = *.c *.cpp *.h *.js *.py
FILE_PATTERNS = *.c \
*.cpp \
*.h \
*.js \
*.py
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO.
@@ -496,6 +511,13 @@ EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = *test*
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the output.
# The symbol name can be a fully qualified name, a word, or if the wildcard * is used,
# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
EXCLUDE_SYMBOLS =
# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
# the \include command).
@@ -659,7 +681,7 @@ HTML_HEADER =
HTML_FOOTER =
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
# style sheet that is used by each HTML page. *It can be used to
# style sheet that is used by each HTML page. It can be used to
# fine-tune the look of the HTML output. If the tag is left blank doxygen
# will generate a default style sheet. Note that doxygen will try to copy
# the style sheet file to the HTML output directory, so don't put your own
@@ -1085,6 +1107,14 @@ PERL_PATH = /usr/bin/perl
CLASS_DIAGRAMS = YES
# You can define message sequence charts within doxygen comments using the \msc
# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to
# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to
# specify the directory where the mscgen tool resides. If left empty the tool is assumed to
# be found in the default search path.
MSCGEN_PATH =
# If set to YES, the inheritance and collaboration graphs will hide
# inheritance and usage relations if the target is undocumented
# or is not a class.
@@ -1187,33 +1217,13 @@ DOT_PATH =
DOTFILE_DIRS =
# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
# this value, doxygen will try to truncate the graph, so that it fits within
# the specified constraint. Beware that most browsers cannot cope with very
# large images.
# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
# nodes that will be shown in the graph. If the number of nodes in a graph
# becomes larger than this value, doxygen will truncate the graph, which is
# visualized by representing a node as a red box. Note that doxygen will always
# show the root nodes and its direct children regardless of this setting.
MAX_DOT_GRAPH_WIDTH = 1024
# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
# this value, doxygen will try to truncate the graph, so that it fits within
# the specified constraint. Beware that most browsers cannot cope with very
# large images.
MAX_DOT_GRAPH_HEIGHT = 1024
# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
# graphs generated by dot. A depth value of 3 means that only nodes reachable
# from the root by following a path via at most 3 edges will be shown. Nodes
# that lay further from the root node will be omitted. Note that setting this
# option to 1 or 2 may greatly reduce the computation time needed for large
# code bases. Also note that a graph may be further truncated if the graph's
# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH
# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default),
# the graph is not depth-constrained.
MAX_DOT_GRAPH_DEPTH = 0
DOT_GRAPH_MAX_NODES = 50
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
# background. This is disabled by default, which results in a white background.
+15 -12
View File
@@ -43,24 +43,27 @@
#define SPAMD_DEFAULT_WEIGHT 1
#define SPAMD_DEFAULT_CONNECTION_TIMEOUT 20 /* milliseconds */
/** Connects to spamd to process the message. Depending on your settings, analyzed
* messages are left untouched, or requeued with additional spam information in the
* headers, or they may be deleted from the queue entirely.
/** Connect to spamd to process a message.
* Depending on your settings, analyzed messages are left untouched, or
* requeued with additional spam information in the headers, or they may
* be deleted from the queue entirely.
*
* \param queueID is the queue-unique id of the message currently being processed.
* NMAP provides this in the callback.
*
* \param client contains all the information for this particular session with NMAP.
*
* \retval infected: returns a boolean summarizing whether or not the message was
* determined to be spam.
* \param spamd SpamD configuration structure
* \param client SpamD client structure representing store session
* \param queueID Queue-unique id of the message currently being processed. NMAP provides this in the callback.
* \param hasFlags To be documented
* \param msgFlags To be documented
* \param senderIp IP address of the sending party
* \param senderUserName Username of the sending party (FIXME - check this)
* \return True if infected.
*
* If you want verbose output from spamd portion of the antispam agent then
* #define VERBOSE_SPAMD
* define VERBOSE_SPAMD
*/
/* #define VERBOSE_SPAMD */
BOOL
SpamdCheck(SpamdConfig *spamd, ASpamClient *client, const char *queueID, BOOL hasFlags, unsigned long msgFlags, unsigned long senderIp, char *senderUserName)
SpamdCheck(SpamdConfig *spamd, ASpamClient *client, const char *queueID, BOOL hasFlags,
unsigned long msgFlags, unsigned long senderIp, char *senderUserName)
{
int ccode;
BOOL infected;
+83
View File
@@ -935,8 +935,68 @@ RequireSharedTransaction(StoreClient *client)
}
}
void
TCStart(StoreClient *store, char *command)
{
TimedCommand *result = MemMalloc(sizeof(TimedCommand));
gettimeofday(&(result->start), NULL);
result->msgs = result->lastmsg = NULL;
result->command = command;
store->tc = result;
}
void
TCLog(StoreClient *store, char *message)
{
TimedCommand *t = store->tc;
TimedMessage *m = MemMalloc(sizeof(TimedMessage));
if (t == NULL) return;
m->message = message;
gettimeofday(&(m->time), NULL);
m->next = NULL;
if (t->lastmsg == NULL) {
t->msgs = m;
t->lastmsg = m;
} else {
t->lastmsg->next = m;
t->lastmsg = m;
}
}
void
TCEnd(StoreClient *store)
{
TimedCommand *t = store->tc;
TimedMessage *m;
struct timeval *last;
long int seconds, useconds;
gettimeofday(&(t->end), NULL);
seconds = (t->end.tv_sec - t->start.tv_sec);
useconds = t->end.tv_usec - t->start.tv_usec;
if (useconds < 0) {
seconds--; useconds+= 1000000;
}
printf("Command %s took %ld.%06ld seconds.\n", t->command, seconds, useconds);
m = t->msgs;
last = &(t->start);
while (m) {
TimedMessage *delete = m;
seconds = (m->time.tv_sec - last->tv_sec);
useconds = (m->time.tv_usec - last->tv_usec);
if (useconds < 0) {
seconds--;
useconds += 1000000;
}
printf(" - %s (%ld.%06ld)\n", m->message, seconds, useconds);
last = &(m->time);
m = m->next;
MemFree(m);
}
MemFree(t);
store->tc = NULL;
}
#define TOK_ARR_SZ 10
#define PROP_ARR_SZ 10
@@ -959,6 +1019,7 @@ StoreCommandLoop(StoreClient *client)
if (-1 == ccode || ccode >= CONN_BUFSIZE) {
break;
}
TCStart(client, client->buffer);
memset(tokens, 0, sizeof(tokens));
n = CommandSplit(client->buffer, tokens, TOK_ARR_SZ);
@@ -972,6 +1033,7 @@ StoreCommandLoop(StoreClient *client)
/* Or maybe we want to do something clever, like check for new mail
after a timeout has elapsed */
ImportIncomingMail(client);
TCLog(client, "Import incoming");
}
if (client->watch.collection) {
@@ -984,6 +1046,7 @@ StoreCommandLoop(StoreClient *client)
/* FIXME: What if there were an event related to a document relevant
to the command we just parsed? (or any event?) Should we ignore
the command? */
TCLog(client, "Out of band messages");
}
switch (command) {
@@ -1976,6 +2039,8 @@ StoreCommandLoop(StoreClient *client)
break;
}
TCLog(client, "Finished processing");
if (client->watchLock) {
StoreReleaseCollectionLock(client, &(client->watchLock));
client->watchLock = NULL;
@@ -1990,6 +2055,8 @@ StoreCommandLoop(StoreClient *client)
if (ccode >= 0) {
ccode = ConnFlush(client->conn);
}
TCEnd(client);
}
return ccode;
@@ -2856,6 +2923,7 @@ StoreCommandCOPY(StoreClient *client, uint64_t guid, DStoreDocInfo *collection)
if (ccode) {
return ccode;
}
TCLog(client, "Starting document copy");
FindPathToDocument(client, info.collection, info.guid, srcpath, sizeof(srcpath));
src = fopen(srcpath, "r");
@@ -2872,6 +2940,7 @@ StoreCommandCOPY(StoreClient *client, uint64_t guid, DStoreDocInfo *collection)
goto finish;
}
// TODO: how to detect MSG5220QUOTAERR ?
TCLog(client, "Files linked");
start = 0;
end = info.length;
@@ -2887,16 +2956,19 @@ StoreCommandCOPY(StoreClient *client, uint64_t guid, DStoreDocInfo *collection)
goto finish;
}
TCLog(client, "Processed doc");
errmsg = StoreProcessDocument(client, &info, collection, dstpath, 0);
if (errmsg) {
ccode = ConnWriteStr(client->conn, errmsg);
goto finish;
}
TCLog(client, "Parse contents");
errmsg = StoreIndexDocument(client, &info, collection, NULL, dstpath);
if (errmsg) {
ccode = ConnWriteStr(client->conn, errmsg);
goto finish;
}
TCLog(client, "Index contents");
// swap dest to src, and find new dest - move temp file into correct position
srcpath[0] = '\0';
@@ -2912,6 +2984,7 @@ StoreCommandCOPY(StoreClient *client, uint64_t guid, DStoreDocInfo *collection)
ccode = ConnWriteStr(client->conn, MSG4228CANTWRITEMBOX);
goto finish;
}
TCLog(client, "Commit transaction");
++client->stats.insertions;
StoreWatcherEvent(client, lock, STORE_WATCH_EVENT_NEW,
@@ -2984,6 +3057,7 @@ StoreCommandDELETE(StoreClient *client, uint64_t guid)
}
updateConversation = FALSE;
TCLog(client, "Ready to remove document");
switch (info.type) {
case STORE_DOCTYPE_MAIL:
@@ -3012,10 +3086,12 @@ StoreCommandDELETE(StoreClient *client, uint64_t guid)
ccode = ConnWriteStr(client->conn, MSG5005DBLIBERR);
goto finish;
}
TCLog(client, "Document removed");
/* Try our best here, it's ok if it fails */
if (updateConversation) {
UpdateConversationMetadata(client->handle, &conversation);
TCLog(client, "Conversation updated");
}
break;
@@ -3038,6 +3114,7 @@ StoreCommandDELETE(StoreClient *client, uint64_t guid)
ccode = ConnWriteStr(client->conn, MSG4228CANTWRITEMBOX);
goto finish;
}
TCLog(client, "Removed from file system");
if (DStoreCommitTransaction(client->handle)) {
ccode = ConnWriteStr(client->conn, MSG4228CANTWRITEMBOX);
@@ -3045,6 +3122,7 @@ StoreCommandDELETE(StoreClient *client, uint64_t guid)
}
IndexRemoveDocument(index, guid);
TCLog(client, "Removed from Index");
++client->stats.deletions;
StoreWatcherEvent(client, lock, STORE_WATCH_EVENT_DELETED,
@@ -3351,6 +3429,7 @@ StoreCommandFLAG(StoreClient *client, uint64_t guid, uint32_t change, int mode)
if (ccode) {
return ccode;
}
TCLog(client, "Checked flags and auth");
if (STORE_DOCTYPE_CONVERSATION == info.type) {
/* propagate STARS flag to conversation source */
@@ -3364,12 +3443,14 @@ StoreCommandFLAG(StoreClient *client, uint64_t guid, uint32_t change, int mode)
if (-1 == DStoreSetDocInfo(client->handle, &info)) {
return ConnWriteStr(client->conn, MSG5005DBLIBERR);
}
TCLog(client, "Set doc info");
if (info.type == STORE_DOCTYPE_MAIL && info.conversation != 0) {
if (DStoreGetDocInfoGuid(client->handle, info.conversation, &conversation) == 1) {
if (UpdateConversationMemberNewFlag(client->handle, &conversation, oldFlags, change)) {
return ConnWriteStr(client->conn, MSG5005DBLIBERR);
}
TCLog(client, "Updated conversation");
}
}
@@ -3387,11 +3468,13 @@ StoreCommandFLAG(StoreClient *client, uint64_t guid, uint32_t change, int mode)
ccode = ConnWriteStr(client->conn, MSG5007INDEXLIBERR);
goto finish;
}
TCLog(client, "Updated Index");
if (0 != DStoreCommitTransaction(client->handle)) {
ccode = ConnWriteStr(client->conn, MSG4228CANTWRITEMBOX);
goto finish;
}
TCLog(client, "Transaction committed");
++client->stats.updates;
StoreWatcherEvent(client, lock, STORE_WATCH_EVENT_FLAGS,
+9 -10
View File
@@ -589,18 +589,17 @@ PrintRecurrence(BongoCalRule *r)
/**
* BongoCalRecurGenerateInstances:
* @inst: A calendar component object.
* @start: Range start time.
* @end: Range end time.
* @cb: Callback function.
* @cbData: Closure data for the callback function.
* @tzCb: Callback for retrieving timezones.
* @tzCbData: Closure data for the timezone callback.
* @defaultTimezone: Default timezone to use when a timezone cannot be
* found.
* \param inst A calendar component object.
* \param start Range start time.
* \param end Range end time.
* \param cb Callback function.
* \param cbData Closure data for the callback function.
* \param tzCb Callback for retrieving timezones.
* \param tzCbData Closure data for the timezone callback.
* \param defaultTimezone Default timezone to use when a timezone cannot be found.
*
* Calls the given callback function for each occurrence of the event that
* intersects the range between the given @start and @end times (the end time is
* intersects the range between the given start and end times (the end time is
* not included). Note that the occurrences may start before the given start
* time.
*
+2 -2
View File
@@ -1049,12 +1049,12 @@ ConnAppendToAllocatedBuffer(const char *source, const long size, char **buffer,
}
/**
* Read a line (until \r\n) from a network socket, potentially blocking until enough
* Read a line (until CRLF) from a network socket, potentially blocking until enough
* data is available. This line is read to a buffer (which may be pre-allocated).
* The buffer may be resized, and if enough space is not available will be destroyed.
* If the buffer is destroyed (*buffer == NULL), the number of bytes consumed
* from the network socket is still returned but the data discarded.
* The trailing \r\n on the line is consumed.
* The trailing CRLF on the line is consumed.
* \param c Connection to read the line from
* \param buffer Pointer to the allocated buffer (point to NULL if you want the buffer to be allocated for you)
* \param bufferSize Size of the pre-allocated buffer (0 if you want the buffer to be pre-allocated)
+1 -1
View File
@@ -29,7 +29,7 @@ MsgAuthCookiePath(const char *username, char *path, size_t length)
/**
* Create a 'cookie': a password-substitute token, and an associated expiry
* SECURITY: We shouldn't create cookies for non-authenticated users
* \param user User whose token this will be
* \param username User whose token this will be
* \param cookie Reference to the MsgAuthCookie we're creating
* \param timeout When the token should expire
* \return Whether or not the cookie was created
+1 -1
View File
@@ -236,7 +236,7 @@ ReadBongoConfiguration(BongoConfigItem *config, char *filename) {
/**
* Process a configuration definition
* \param config BongoConfigItem array which defines configuration variables
* \param JSON node tree we want to look in
* \param node JSON node tree we want to look in
* \return Whether or not we were successful
*/
+22 -53
View File
@@ -833,22 +833,14 @@ NMAPGetDecimalProperty(Connection *conn, uint64_t guid, const char *propertyName
- copies the first non 6000 line excluding the \\r\\n into the response buffer
- advances read pointer to the beginning of the next line on success
@return
- 2001 on success
- other values between 1000 and 9999 indicate protocol error
- negative value indicates a network error
@param conn the network connection to read the line from
@param guid the object where the property will be read
@param propertyName is the property name expected
@param propertyValue is a pointer where the property value will be set
* \param conn Network connection to read the line from
* \param propertyName Property name expected
* \param propertyValue Pointer where the property value will be set
* \return 2001 on success, 1000-9999 is protocol error. Negative values are network error.
*/
int
NMAPReadHexadecimalPropertyResponse(Connection *conn, const char *propertyName, unsigned long *propertyValue)
NMAPReadHexadecimalPropertyResponse(Connection *conn, const char *propertyName,
unsigned long *propertyValue)
{
long ccode;
char propertyBuffer[MAX_DIGITS];
@@ -895,24 +887,13 @@ NMAPGetHexadecimalProperty(Connection *conn, uint64_t guid, const char *property
}
/** Used to write decimal properties to NMAP.
Remarks
- Sends the PROPSET command to NMAP and processes the response
- processes 6000 response lines encountered
@return
- 1000 on success
- other values between 1001 and 9999 indicate protocol error
- negative value indicates a network error
@param conn the network connection to read the line from
@param guid the object where the property will be applied
@param propertyName is the property name to be set
@param propertyValue is the property value to be set
* Sends the PROPSET command to NMAP and processes the response, also
* processes 6000 response lines encountered.
* \param conn Network connection to read line from
* \param guid Object to apply property to
* \param propertyName Name of property to be set
* \param propertyValue Value of property to be set
* \return 1000 on success, 1001-9999 is protocol error, negative is network error
*/
int
NMAPSetDecimalProperty(Connection *conn, uint64_t guid, const char *propertyName, long propertyValue)
@@ -938,24 +919,13 @@ NMAPSetDecimalProperty(Connection *conn, uint64_t guid, const char *propertyName
}
/** Used to write hexadecimal properties to NMAP.
Remarks
- Sends the PROPSET command to NMAP and processes the response
- processes 6000 response lines encountered
@return
- 1000 on success
- other values between 1001 and 9999 indicate protocol error
- negative value indicates a network error
@param conn the network connection to read the line from
@param guid the object where the property will be applied
@param propertyName is the property name to be set
@param propertyValue is the property value to be set
* - Sends the PROPSET command to NMAP and processes the response
* - processes 6000 response lines encountered
* \param conn Network connection to read the line from
* \param guid Object where the property will be applied
* \param propertyName Property name to be set
* \param propertyValue Property value to be set
* \return 1000 on success; 1001 to 9999 indicate protocol error, negative value indicates a network error
*/
int
NMAPSetHexadecimalProperty(Connection *conn, uint64_t guid, const char *propertyName, unsigned long propertyValue)
@@ -1495,9 +1465,8 @@ NMAPAuthenticateWithCookie(Connection *conn, const char *user, const char *cooki
/**
* AUTH SYSTEM with the Store agent, but then change to a user and
* go into their store.
* \param conn Connection to the Queue agent
* \param response Buffer to use talking to the agent
* \param length Size of the 'response' buffer
* \param conn Connection to the Store agent
* \param user Which user we want to be
* \return Whether or not we succeeded
*/
BOOL