~ubuntu-branches/ubuntu/trusty/bip/trusty-proposed

« back to all changes in this revision

Viewing changes to .pc/armel.patch/src/log.h

  • Committer: Bazaar Package Importer
  • Author(s): Pierre-Louis Bonicoli
  • Date: 2010-09-22 11:15:15 UTC
  • Revision ID: james.westby@ubuntu.com-20100922111515-e8z0kt0nki6eb96m
Tags: 0.8.6-2
* New maintainer (with Nohar's blessing).
* Add armel.patch: fix build errors on armel (Closes: #597262). 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Id: log.h,v 1.26 2005/04/12 19:34:35 nohar Exp $
 
3
 *
 
4
 * This file is part of the bip project
 
5
 * Copyright (C) 2004 Arnaud Cornet and Loïc Gomez
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or modify
 
8
 * it under the terms of the GNU General Public License as published by
 
9
 * the Free Software Foundation; either version 2 of the License, or
 
10
 * (at your option) any later version.
 
11
 * See the file "COPYING" for the exact licensing terms.
 
12
 */
 
13
 
 
14
#ifndef LOG_H
 
15
#define LOG_H
 
16
#define _XOPEN_SOURCE 500
 
17
#include <stdio.h>
 
18
#include <stdlib.h>
 
19
#include <sys/types.h>
 
20
#include <pwd.h>
 
21
#include <stdio.h>
 
22
#include <ctype.h>
 
23
#include <time.h>
 
24
#include "util.h"
 
25
 
 
26
#define MAX_PATH_LEN 1024
 
27
#define LOGLINE_MAXLEN 2048
 
28
 
 
29
struct list;
 
30
 
 
31
typedef struct logfile
 
32
{
 
33
        FILE *file;
 
34
        char *filename;
 
35
        char *canonical_filename;
 
36
        struct tm last_log;
 
37
        size_t len;
 
38
} logfile_t;
 
39
 
 
40
typedef struct logstore
 
41
{
 
42
        char *name;
 
43
        list_t file_group;
 
44
        int skip_advance;
 
45
 
 
46
        list_t *memlog;
 
47
        int memc;
 
48
        int track_backlog;
 
49
        list_iterator_t file_it;
 
50
        size_t file_offset;
 
51
} logstore_t;
 
52
 
 
53
typedef struct log
 
54
{
 
55
        hash_t logfgs;
 
56
        char *network;
 
57
        char *buffer;
 
58
        int connected;
 
59
        int backlogging;
 
60
        int lastfile_seeked;
 
61
 
 
62
        struct user *user;
 
63
} log_t;
 
64
 
 
65
log_t *log_new(struct user *user, const char *network);
 
66
void logdata_free(log_t *logdata);
 
67
 
 
68
void log_join(log_t *logdata, const char *ircmask, const char *channel);
 
69
void log_part(log_t *logdata, const char *ircmask, const char *channel,
 
70
                const char *message);
 
71
void log_kick(log_t *logdata, const char *ircmask, const char *channel,
 
72
                const char *who, const char *message);
 
73
void log_quit(log_t *logdata, const char *ircmask, const char *channel,
 
74
                const char *message);
 
75
void log_nick(log_t *logdata, const char *ircmask, const char *channel,
 
76
                const char *newnick);
 
77
void log_privmsg(log_t *logdata, const char *ircmask, const char *destination,
 
78
                const char *message);
 
79
void log_notice(log_t *logdata, const char *ircmask, const char *channel,
 
80
                const char *message);
 
81
void log_cli_privmsg(log_t *logdata, const char *ircmask,
 
82
                const char *destination, const char *message);
 
83
void log_cli_notice(log_t *logdata, const char *ircmask, const char *channel,
 
84
                const char *message);
 
85
void log_write(log_t *logdata, const char *str, const char *destination);
 
86
void log_mode(log_t *logdata, const char *ircmask, const char *channel,
 
87
                const char *modes, array_t *mode_args);
 
88
void log_topic(log_t *logdata, const char *ircmask, const char *channel,
 
89
                const char *message);
 
90
void log_init_topic(log_t *logdata, const char *channel, const char *message);
 
91
void log_init_topic_time(log_t *logdata, const char *channel, const char *who,
 
92
                const char *when);
 
93
void log_connected(log_t *logdata);
 
94
void log_disconnected(log_t *logdata);
 
95
void log_ping_timeout(log_t *logdata);
 
96
void log_client_disconnected(log_t *logdata);
 
97
void log_client_connected(log_t *logdata);
 
98
int log_has_backlog(log_t *logdata, const char *destination);
 
99
void log_flush_all(void);
 
100
void log_client_none_connected(log_t *logdata);
 
101
void log_reset_all(log_t *logdata);
 
102
void log_free(log_t *log);
 
103
int check_dir(char *filename, int is_fatal);
 
104
void log_reset_store(log_t *log, const char *storename);
 
105
void log_drop(log_t *log, const char *storename);
 
106
 
 
107
list_t *log_backlogs(log_t *log);
 
108
list_t *backlog_lines(log_t *log, const char *bl, const char *cli_nick,
 
109
                int hours);
 
110
#endif