Mercurial > pidgin
diff src/log.h @ 8898:de87e510ff9a
[gaim-migrate @ 9667]
This makes the history plugin work in chats and not just conversations.
To do this I had to change some functions in log.c to pass around the
GaimLogType (GAIM_LOG_IM, GAIM_LOG_CHAT, or GAIM_LOG_SYSTEM). I hope
that's not a problem...
Here's how I see it:
When creating a new GaimLog you need 3 things, the type, your account
and the name of the other person/chat.
It only makes sense that you would need those same 3 things to find a
log. Or to calculate log size.
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Fri, 07 May 2004 02:30:02 +0000 |
| parents | 92cbf9713795 |
| children | b540c735a6ad |
line wrap: on
line diff
--- a/src/log.h Thu May 06 23:56:52 2004 +0000 +++ b/src/log.h Fri May 07 02:30:02 2004 +0000 @@ -74,7 +74,7 @@ void (*finalize)(GaimLog *log); /** This function returns a sorted GList of available GaimLogs */ - GList *(*list)(const char *name, GaimAccount *account); + GList *(*list)(GaimLogType type, const char *name, GaimAccount *account); /** Given one of the logs returned by the logger's list function, * this returns the contents of the log in GtkIMHtml markup */ @@ -86,7 +86,7 @@ /** Returns the total size of all the logs. If this is undefined a default * implementation is used */ - int (*total_size)(const char *name, GaimAccount *account); + int (*total_size)(GaimLogType type, const char *name, GaimAccount *account); /** This function returns a sorted GList of available system GaimLogs */ GList *(*list_syslog)(GaimAccount *account); @@ -165,11 +165,12 @@ /** * Returns a list of all available logs * + * @param type The type of the log * @param name The name of the log * @param account The account * @return A sorted list of GaimLogs */ - GList *gaim_log_get_logs(const char *name, GaimAccount *account); + GList *gaim_log_get_logs(GaimLogType type, const char *name, GaimAccount *account); /** * Returns a list of all available system logs @@ -194,7 +195,7 @@ * @param account The account * @return The size in bytes */ - int gaim_log_get_total_size(const char *name, GaimAccount *account); + int gaim_log_get_total_size(GaimLogType type, const char *name, GaimAccount *account); /** * Implements GCompareFunc @@ -221,13 +222,13 @@ * * @return The new logger */ - GaimLogLogger *gaim_log_logger_new(void(*create)(GaimLog *), - void(*write)(GaimLog *, GaimMessageFlags, - const char *, time_t, const char *), - void(*finalize)(GaimLog *), - GList*(*list)(const char*, GaimAccount*), - char*(*read)(GaimLog*, GaimLogReadFlags*), - int(*size)(GaimLog*)); + 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*)); /** * Frees a logger *
