gaim. More...
#include <stdio.h>
#include "account.h"
#include "conversation.h"
Include dependency graph for log.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | _GaimLogLogger |
A log logger. More... | |
struct | _GaimLog |
A log. More... | |
GaimLog * | gaim_log_new (GaimLogType type, const char *name, GaimAccount *account, time_t time) |
Creates a new log. | |
void | gaim_log_free (GaimLog *log) |
Frees a log. | |
void | gaim_log_write (GaimLog *log, GaimMessageFlags type, const char *from, time_t time, const char *message) |
Writes to a log file. | |
char * | gaim_log_read (GaimLog *log, GaimLogReadFlags *flags) |
Reads from a log. | |
GList * | gaim_log_get_logs (GaimLogType type, const char *name, GaimAccount *account) |
Returns a list of all available logs. | |
GList * | gaim_log_get_system_logs (GaimAccount *account) |
Returns a list of all available system logs. | |
int | gaim_log_get_size (GaimLog *log) |
Returns the size of a log. | |
int | gaim_log_get_total_size (GaimLogType type, const char *name, GaimAccount *account) |
Returns the size, in bytes, of all available logs in this conversation. | |
gint | gaim_log_compare (gconstpointer y, gconstpointer z) |
Implements GCompareFunc. | |
GaimLogLogger * | gaim_log_logger_new (void(*create)(GaimLog *), void(*write)(GaimLog *, GaimMessageFlags, const char *, time_t, const char *), void(*finalize)(GaimLog *), GList *(*list)(GaimLogType type, const char *, GaimAccount *), char *(*read)(GaimLog *, GaimLogReadFlags *), int(*size)(GaimLog *)) |
Creates a new logger. | |
void | gaim_log_logger_free (GaimLogLogger *logger) |
Frees a logger. | |
void | gaim_log_logger_add (GaimLogLogger *logger) |
Adds a new logger. | |
void | gaim_log_logger_remove (GaimLogLogger *logger) |
Removes a logger. | |
void | gaim_log_logger_set (GaimLogLogger *logger) |
Sets the current logger. | |
GaimLogLogger * | gaim_log_logger_get (void) |
Returns the current logger. | |
GList * | gaim_log_logger_get_options (void) |
Returns a GList containing the IDs and Names of the registered log loggers. | |
void | gaim_log_init (void) |
Typedefs | |
typedef _GaimLog | GaimLog |
typedef _GaimLogLogger | GaimLogLogger |
Enumerations | |
enum | GaimLogType { GAIM_LOG_IM, GAIM_LOG_CHAT, GAIM_LOG_SYSTEM } |
enum | GaimLogReadFlags { GAIM_LOG_READ_NO_NEWLINE = 1 } |
gaim.
Gaim is the legal property of its developers, whose names are too numerous to list here. Please refer to the COPYRIGHT file distributed with this source distribution.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
gint gaim_log_compare | ( | gconstpointer | y, | |
gconstpointer | z | |||
) |
Implements GCompareFunc.
y | A GaimLog | |
z | Another GaimLog |
void gaim_log_free | ( | GaimLog * | log | ) |
Frees a log.
log | The log to destroy |
GList* gaim_log_get_logs | ( | GaimLogType | type, | |
const char * | name, | |||
GaimAccount * | account | |||
) |
Returns a list of all available logs.
type | The type of the log | |
name | The name of the log | |
account | The account |
int gaim_log_get_size | ( | GaimLog * | log | ) |
Returns the size of a log.
log | The log |
GList* gaim_log_get_system_logs | ( | GaimAccount * | account | ) |
Returns a list of all available system logs.
account | The account |
int gaim_log_get_total_size | ( | GaimLogType | type, | |
const char * | name, | |||
GaimAccount * | account | |||
) |
Returns the size, in bytes, of all available logs in this conversation.
type | The type of the log | |
name | The name of the log | |
account | The account |
void gaim_log_logger_add | ( | GaimLogLogger * | logger | ) |
Adds a new logger.
logger | The new logger to add |
void gaim_log_logger_free | ( | GaimLogLogger * | logger | ) |
Frees a logger.
logger | The logger to free |
GaimLogLogger* gaim_log_logger_get | ( | void | ) |
Returns the current logger.
GList* gaim_log_logger_get_options | ( | void | ) |
Returns a GList containing the IDs and Names of the registered log loggers.
GaimLogLogger* gaim_log_logger_new | ( | void(*)(GaimLog *) | create, | |
void(*)(GaimLog *, GaimMessageFlags, const char *, time_t, const char *) | write, | |||
void(*)(GaimLog *) | finalize, | |||
GList *(*)(GaimLogType type, const char *, GaimAccount *) | list, | |||
char *(*)(GaimLog *, GaimLogReadFlags *) | read, | |||
int(*)(GaimLog *) | size | |||
) |
Creates a new logger.
create | The logger's new function. | |
write | The logger's write function. | |
finalize | The logger's finalize function. | |
list | The logger's list function. | |
read | The logger's read function. | |
size | The logger's size function. |
void gaim_log_logger_remove | ( | GaimLogLogger * | logger | ) |
Removes a logger.
logger | The logger to remove |
void gaim_log_logger_set | ( | GaimLogLogger * | logger | ) |
Sets the current logger.
logger | The logger to set |
GaimLog* gaim_log_new | ( | GaimLogType | type, | |
const char * | name, | |||
GaimAccount * | account, | |||
time_t | time | |||
) |
Creates a new log.
type | The type of log this is. | |
name | The name of this conversation (Screenname, chat name, etc.) | |
account | The account the conversation is occurring on | |
time | The time this conversation started |
char* gaim_log_read | ( | GaimLog * | log, | |
GaimLogReadFlags * | flags | |||
) |
Reads from a log.
log | The log to read from | |
flags | The returned logging flags. |
void gaim_log_write | ( | GaimLog * | log, | |
GaimMessageFlags | type, | |||
const char * | from, | |||
time_t | time, | |||
const char * | message | |||
) |
Writes to a log file.
Assumes you have already checked if logging is appropriate.
log | The log to write to | |
type | The type of message being logged | |
from | Whom this message is coming from, or NULL for system messages | |
time | A timestamp in UNIX time | |
message | The message to log |