comparison src/log.c @ 7440:8c0527c91a92

[gaim-migrate @ 8045] this is all more better, but i forget what it all is. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Wed, 05 Nov 2003 23:43:53 +0000
parents 7cdbd2eb7546
children 4304bb369240
comparison
equal deleted inserted replaced
7439:3a51b301a805 7440:8c0527c91a92
40 GaimLog *log = g_new0(GaimLog, 1); 40 GaimLog *log = g_new0(GaimLog, 1);
41 log->name = g_strdup(name); 41 log->name = g_strdup(name);
42 log->account = account; 42 log->account = account;
43 log->time = time; 43 log->time = time;
44 log->logger = gaim_log_logger_get(); 44 log->logger = gaim_log_logger_get();
45 if (log->logger && log->logger->new) 45 if (log->logger && log->logger->create)
46 log->logger->new(log); 46 log->logger->create(log);
47 return log; 47 return log;
48 } 48 }
49 49
50 void gaim_log_free(GaimLog *log) 50 void gaim_log_free(GaimLog *log)
51 { 51 {
97 } 97 }
98 gaim_log_logger_set(&txt_logger); 98 gaim_log_logger_set(&txt_logger);
99 } 99 }
100 100
101 101
102 GaimLogLogger *gaim_log_logger_new(void(*new)(GaimLog *), 102 GaimLogLogger *gaim_log_logger_new(void(*create)(GaimLog *),
103 void(*write)(GaimLog *, GaimMessageFlags, const char *, 103 void(*write)(GaimLog *, GaimMessageFlags, const char *,
104 time_t, const char *), 104 time_t, const char *),
105 void(*finalize)(GaimLog *), GList*(*list)(const char*, GaimAccount*), 105 void(*finalize)(GaimLog *), GList*(*list)(const char*, GaimAccount*),
106 char*(*read)(GaimLog*, GaimLogReadFlags*)) 106 char*(*read)(GaimLog*, GaimLogReadFlags*))
107 { 107 {
108 GaimLogLogger *logger = g_new0(GaimLogLogger, 1); 108 GaimLogLogger *logger = g_new0(GaimLogLogger, 1);
109 logger->new = new; 109 logger->create = create;
110 logger->write = write; 110 logger->write = write;
111 logger->finalize = finalize; 111 logger->finalize = finalize;
112 logger->list = list; 112 logger->list = list;
113 logger->read = read; 113 logger->read = read;
114 return logger; 114 return logger;