comparison src/log.h @ 13119:fcde3faa1f57

[gaim-migrate @ 15481] This adds support for displaying log timestamps in their original timezone. If your OS's definition of struct tm sucks, then the log timestamps will show up in your local timezone, but converted, so the time is accurate. Yay! Anyway, this all works, as I've renamed lots of my log files locally, but currently, there's no code to save new logs in this name format. That's held up on a portability issue and backwards compatibility issue. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Sat, 04 Feb 2006 20:55:52 +0000
parents 1b71ad2eccdb
children 0a8b72b12cef
comparison
equal deleted inserted replaced
13118:8855973b487b 13119:fcde3faa1f57
110 */ 110 */
111 struct _GaimLog { 111 struct _GaimLog {
112 GaimLogType type; /**< The type of log this is */ 112 GaimLogType type; /**< The type of log this is */
113 char *name; /**< The name of this log */ 113 char *name; /**< The name of this log */
114 GaimAccount *account; /**< The account this log is taking 114 GaimAccount *account; /**< The account this log is taking
115 place on */ 115 place on */
116 GaimConversation *conv; /**< The conversation being logged */ 116 GaimConversation *conv; /**< The conversation being logged */
117 time_t time; /**< The time this conversation 117 time_t time; /**< The time this conversation
118 started */ 118 started, converted to the local timezone */
119
119 GaimLogLogger *logger; /**< The logging mechanism this log 120 GaimLogLogger *logger; /**< The logging mechanism this log
120 is to use */ 121 is to use */
121 void *logger_data; /**< Data used by the log logger */ 122 void *logger_data; /**< Data used by the log logger */
123 struct tm *tm; /**< The time this conversation
124 started, saved with original
125 timezone data, if available and
126 if struct tm has the BSD
127 timezone fields, else @c NULL.
128 Do NOT modify anything in this struct.*/
122 }; 129 };
123 130
124 /** 131 /**
125 * A common logger_data struct containing a file handle and path, as well 132 * A common logger_data struct containing a file handle and path, as well
126 * as a pointer to something else for additional data. 133 * as a pointer to something else for additional data.
171 * @param name The name of this conversation (screenname, chat name, 178 * @param name The name of this conversation (screenname, chat name,
172 * etc.) 179 * etc.)
173 * @param account The account the conversation is occurring on 180 * @param account The account the conversation is occurring on
174 * @param conv The conversation being logged 181 * @param conv The conversation being logged
175 * @param time The time this conversation started 182 * @param time The time this conversation started
183 * @param tm The time this conversation started, with timezone data,
184 * if available and if struct tm has the BSD timezone fields.
176 * @return The new log 185 * @return The new log
177 */ 186 */
178 GaimLog *gaim_log_new(GaimLogType type, const char *name, GaimAccount *account, 187 GaimLog *gaim_log_new(GaimLogType type, const char *name, GaimAccount *account,
179 GaimConversation *conv, time_t time); 188 GaimConversation *conv, time_t time, const struct tm *tm);
180 189
181 /** 190 /**
182 * Frees a log 191 * Frees a log
183 * 192 *
184 * @param log The log to destroy 193 * @param log The log to destroy