49 PURPLE_LOG_READ_NO_NEWLINE = 1
55typedef void (*PurpleLogSetCallback) (GHashTable *sets,
PurpleLogSet *set);
86 char *(*read)(
PurpleLog *log, PurpleLogReadFlags *flags);
113 gboolean (*is_deletable)(
PurpleLog *log);
115 void (*_purple_reserved1)(void);
116 void (*_purple_reserved2)(void);
117 void (*_purple_reserved3)(void);
118 void (*_purple_reserved4)(void);
230 const char *message);
PurpleMessageFlags
Flags applicable to a message.
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.
void purple_log_logger_free(PurpleLogLogger *logger)
Frees a logger.
void purple_log_write(PurpleLog *log, PurpleMessageFlags type, const char *from, time_t time, const char *message)
Writes to a log file.
int purple_log_get_activity_score(PurpleLogType type, const char *name, PurpleAccount *account)
Returns the activity score of a log, based on total size in bytes, which is then decayed based on age...
void purple_log_logger_add(PurpleLogLogger *logger)
Adds a new logger.
GList * purple_log_logger_get_options(void)
Returns a GList containing the IDs and names of the registered loggers.
int purple_log_common_sizer(PurpleLog *log)
Returns the size of a given PurpleLog.
gboolean purple_log_delete(PurpleLog *log)
Deletes a log.
GList * purple_log_get_logs(PurpleLogType type, const char *name, PurpleAccount *account)
Returns a list of all available logs.
PurpleLogLogger * purple_log_logger_new(const char *id, const char *name, int functions,...)
Creates a new logger.
void purple_log_free(PurpleLog *log)
Frees a log.
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,...
PurpleLogLogger * purple_log_logger_get(void)
Returns the current logger.
void purple_log_logger_set(PurpleLogLogger *logger)
Sets the current logger.
void purple_log_logger_remove(PurpleLogLogger *logger)
Removes a logger.
void * purple_log_get_handle(void)
Returns the log subsystem handle.
gboolean purple_log_is_deletable(PurpleLog *log)
Tests whether a log is deletable.
GHashTable * purple_log_get_log_sets(void)
Returns a GHashTable of PurpleLogSets.
gint purple_log_compare(gconstpointer y, gconstpointer z)
Implements GCompareFunc for PurpleLogs.
void purple_log_set_free(PurpleLogSet *set)
Frees a log set.
gboolean purple_log_common_deleter(PurpleLog *log)
Deletes a log.
GList * purple_log_get_system_logs(PurpleAccount *account)
Returns a list of all available system logs.
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.
void purple_log_uninit(void)
Uninitializes the log subsystem.
gboolean purple_log_common_is_deletable(PurpleLog *log)
Checks to see if a log is deletable.
int purple_log_get_size(PurpleLog *log)
Returns the size of a log.
char * purple_log_read(PurpleLog *log, PurpleLogReadFlags *flags)
Reads from a log.
PurpleLog * purple_log_new(PurpleLogType type, const char *name, PurpleAccount *account, PurpleConversation *conv, time_t time, const struct tm *tm)
Creates a new log.
gint purple_log_set_compare(gconstpointer y, gconstpointer z)
Implements GCompareFunc for PurpleLogSets.
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.
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.
void purple_log_init(void)
Initializes the log subsystem.
Structure representing an account.
A core representation of a conversation between two or more people.
A common logger_data struct containing a file handle and path, as well as a pointer to something else...
char * id
an identifier to refer to this logger
int(* total_size)(PurpleLogType type, const char *name, PurpleAccount *account)
Returns the total size of all the logs.
void(* get_log_sets)(PurpleLogSetCallback cb, GHashTable *sets)
Adds PurpleLogSets to a GHashTable.
void(* finalize)(PurpleLog *log)
Called when the log is destroyed.
char * name
The logger's name.
int(* size)(PurpleLog *log)
Given one of the logs returned by the logger's list function, this returns the size of the log in byt...
void(* create)(PurpleLog *log)
This gets called when the log is first created.
gsize(* write)(PurpleLog *log, PurpleMessageFlags type, const char *from, time_t time, const char *message)
This is used to write to the log file.
Describes available logs.
PurpleAccount * account
The account the available logs took place on.
char * name
The name of the logs available.
char * normalized_name
The normalized version of name.
gboolean buddy
Is this (account, name) a buddy on the buddy list?
PurpleLogType type
The type of logs available.
struct tm * tm
The time this conversation started, saved with original timezone data, if available and if struct tm ...
PurpleConversation * conv
The conversation being logged.
char * name
The name of this log.
PurpleLogLogger * logger
The logging mechanism this log is to use.
PurpleAccount * account
The account this log is taking place on.
time_t time
The time this conversation started, converted to the local timezone.
void * logger_data
Data used by the log logger.
PurpleLogType type
The type of log this is.