#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 | _PurpleLogLogger |
A log logger. More... | |
struct | _PurpleLog |
A log. More... | |
struct | _PurpleLogCommonLoggerData |
A common logger_data struct containing a file handle and path, as well as a pointer to something else for additional data. More... | |
struct | _PurpleLogSet |
Describes available logs. More... | |
Log Functions | |
PurpleLog * | purple_log_new (PurpleLogType type, const char *name, PurpleAccount *account, PurpleConversation *conv, time_t time, const struct tm *tm) |
Creates a new log. | |
void | purple_log_free (PurpleLog *log) |
Frees a log. | |
void | purple_log_write (PurpleLog *log, PurpleMessageFlags type, const char *from, time_t time, const char *message) |
Writes to a log file. | |
char * | purple_log_read (PurpleLog *log, PurpleLogReadFlags *flags) |
Reads from a log. | |
GList * | purple_log_get_logs (PurpleLogType type, const char *name, PurpleAccount *account) |
Returns a list of all available logs. | |
GHashTable * | purple_log_get_log_sets (void) |
Returns a GHashTable of PurpleLogSets. | |
GList * | purple_log_get_system_logs (PurpleAccount *account) |
Returns a list of all available system logs. | |
int | purple_log_get_size (PurpleLog *log) |
Returns the size of a log. | |
int | purple_log_get_total_size (PurpleLogType type, const char *name, PurpleAccount *account) |
Returns the size, in bytes, of all available logs in this conversation. | |
gboolean | purple_log_is_deletable (PurpleLog *log) |
Tests whether a log is deletable. | |
gboolean | purple_log_delete (PurpleLog *log) |
Deletes a log. | |
char * | purple_log_get_log_dir (PurpleLogType type, const char *name, PurpleAccount *account) |
Returns the default logger directory Purple uses for a given account and username. | |
gint | purple_log_compare (gconstpointer y, gconstpointer z) |
Implements GCompareFunc for PurpleLogs. | |
gint | purple_log_set_compare (gconstpointer y, gconstpointer z) |
Implements GCompareFunc for PurpleLogSets. | |
void | purple_log_set_free (PurpleLogSet *set) |
Frees a log set. | |
Common Logger Functions | |
void | purple_log_common_writer (PurpleLog *log, const char *ext) |
Opens a new log file in the standard Purple log location with the given file extension, named for the current time, for writing. | |
GList * | purple_log_common_lister (PurpleLogType type, const char *name, PurpleAccount *account, const char *ext, PurpleLogLogger *logger) |
Returns a sorted GList of PurpleLogs of the requested type. | |
int | purple_log_common_total_sizer (PurpleLogType type, const char *name, PurpleAccount *account, const char *ext) |
Returns the total size of all the logs for a given user, with a given extension. | |
int | purple_log_common_sizer (PurpleLog *log) |
Returns the size of a given PurpleLog. | |
gboolean | purple_log_common_deleter (PurpleLog *log) |
Deletes a log. | |
gboolean | purple_log_common_is_deletable (PurpleLog *log) |
Checks to see if a log is deletable. | |
Logger Functions | |
PurpleLogLogger * | purple_log_logger_new (const char *id, const char *name, int functions,...) |
Creates a new logger. | |
void | purple_log_logger_free (PurpleLogLogger *logger) |
Frees a logger. | |
void | purple_log_logger_add (PurpleLogLogger *logger) |
Adds a new logger. | |
void | purple_log_logger_remove (PurpleLogLogger *logger) |
Removes a logger. | |
void | purple_log_logger_set (PurpleLogLogger *logger) |
Sets the current logger. | |
PurpleLogLogger * | purple_log_logger_get (void) |
Returns the current logger. | |
GList * | purple_log_logger_get_options (void) |
Returns a GList containing the IDs and names of the registered loggers. | |
Log Subsystem | |
void | purple_log_init (void) |
Initializes the log subsystem. | |
void * | purple_log_get_handle (void) |
Returns the log subsystem handle. | |
void | purple_log_uninit (void) |
Uninitializes the log subsystem. | |
Typedefs | |
typedef _PurpleLog | PurpleLog |
typedef _PurpleLogLogger | PurpleLogLogger |
typedef _PurpleLogCommonLoggerData | PurpleLogCommonLoggerData |
typedef _PurpleLogSet | PurpleLogSet |
typedef void(* | PurpleLogSetCallback )(GHashTable *sets, PurpleLogSet *set) |
Enumerations | |
enum | PurpleLogType { PURPLE_LOG_IM, PURPLE_LOG_CHAT, PURPLE_LOG_SYSTEM } |
enum | PurpleLogReadFlags { PURPLE_LOG_READ_NO_NEWLINE = 1 } |
Definition in file log.h.
|
Deletes a log.
This function should only be used with logs that are written with purple_log_common_writer(). It's intended to be used as a "common" implementation of a logger's
|
|
Checks to see if a log is deletable.
This function should only be used with logs that are written with purple_log_common_writer(). It's intended to be used as a "common" implementation of a logger's
|
|
Returns a sorted GList of PurpleLogs of the requested type.
This function should only be used with logs that are written with purple_log_common_writer(). It's intended to be used as a "common" implementation of a logger's
|
|
Returns the size of a given PurpleLog.
This function should only be used with logs that are written with purple_log_common_writer(). It's intended to be used as a "common" implementation of a logger's
|
|
Returns the total size of all the logs for a given user, with a given extension.
This function should only be used with logs that are written with purple_log_common_writer(). It's intended to be used as a "common" implementation of a logger's
|
|
Opens a new log file in the standard Purple log location with the given file extension, named for the current time, for writing. If a log file is already open, the existing file handle is retained. The log's logger_data value is set to a PurpleLogCommonLoggerData struct containing the log file handle and log path.
This function is intended to be used as a "common" implementation of a logger's
|
|
Implements GCompareFunc for PurpleLogs.
|
|
Deletes a log.
|
|
Frees a log.
|
|
Returns the log subsystem handle.
|
|
Returns the default logger directory Purple uses for a given account and username. This would be where Purple stores logs created by the built-in text or HTML loggers.
|
|
Returns a GHashTable of PurpleLogSets. A "log set" here means the information necessary to gather the PurpleLogs for a given buddy/chat. This information would be passed to purple_log_list to get a list of PurpleLogs. The primary use of this function is to get a list of everyone the user has ever talked to (assuming he or she uses logging). The GHashTable that's returned will free all log sets in it when destroyed. If a PurpleLogSet is removed from the GHashTable, it must be freed with purple_log_set_free().
|
|
Returns a list of all available logs.
|
|
Returns the size of a log.
|
|
Returns a list of all available system logs.
|
|
Returns the size, in bytes, of all available logs in this conversation.
|
|
Tests whether a log is deletable.
A return value of
|
|
Adds a new logger.
|
|
Frees a logger.
|
|
Returns the current logger.
|
|
Returns a GList containing the IDs and names of the registered loggers.
|
|
Creates a new logger.
|
|
Removes a logger.
|
|
Sets the current logger.
|
|
Creates a new log.
|
|
Reads from a log.
|
|
Implements GCompareFunc for PurpleLogSets.
|
|
Frees a log set.
|
|
Writes to a log file. Assumes you have checked preferences already.
|