Mercurial > pidgin.yaz
annotate src/sound.h @ 7431:643cbc9a6035
[gaim-migrate @ 8036]
This is good enough for CVS. This is new logging. It centers around the
highly modular "GaimLogLogger," which controls how to write the log. Currently
I only have the plain text logger. I wrote the beginning of an XML logger, but
decided I didn't think it was that great an idea. Plugins can implement loggers
themselves, so you can have, like, an SQL logger or something.
The default logger writes to a file unique to the conversation, and they're saved
on disk in a heirarchical fashion: ~/.gaim/logs/aim/seanegn/robflynn-date.log would
be a conversation I had with Rob on date.
What doesn't work:
System logging
The search button in the log viewer.
Oh, chats probably don't log either, I didn't test.
You can only log in plain text right now.
Obviously, it's not done yet. But you can play around with it, and give it
some love. I'll get back to it tomorrow after school, maybe.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Wed, 05 Nov 2003 06:15:49 +0000 |
parents | feb3d21a7794 |
children | fa6395637e2c |
rev | line source |
---|---|
4561 | 1 /** |
2 * @file sound.h Sound API | |
3 * | |
4 * gaim | |
5 * | |
6 * Copyright (C) 2003, Nathan Walp <faceprint@faceprint.com> | |
7 * | |
8 * This program is free software; you can redistribute it and/or modify | |
9 * it under the terms of the GNU General Public License as published by | |
10 * the Free Software Foundation; either version 2 of the License, or | |
11 * (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 * GNU General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program; if not, write to the Free Software | |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 */ | |
22 | |
4581 | 23 #ifndef _GAIM_SOUND_H_ |
24 #define _GAIM_SOUND_H_ | |
4561 | 25 |
26 /**************************************************************************/ | |
27 /** Data Structures */ | |
28 /**************************************************************************/ | |
29 | |
30 | |
31 /** | |
5684 | 32 * A type of sound. |
4561 | 33 */ |
34 | |
35 typedef enum _GaimSoundEventID | |
36 { | |
37 GAIM_SOUND_BUDDY_ARRIVE = 0, /**< Buddy signs on. */ | |
38 GAIM_SOUND_BUDDY_LEAVE, /**< Buddy signs off. */ | |
39 GAIM_SOUND_RECEIVE, /**< Receive an IM. */ | |
40 GAIM_SOUND_FIRST_RECEIVE, /**< Receive an IM that starts a conv. */ | |
41 GAIM_SOUND_SEND, /**< Send an IM. */ | |
42 GAIM_SOUND_CHAT_JOIN, /**< Someone joins a chat. */ | |
43 GAIM_SOUND_CHAT_LEAVE, /**< Someone leaves a chat. */ | |
44 GAIM_SOUND_CHAT_YOU_SAY, /**< You say something in a chat. */ | |
45 GAIM_SOUND_CHAT_SAY, /**< Someone else says somthing in a chat. */ | |
46 GAIM_SOUND_POUNCE_DEFAULT, /**< Default sound for a buddy pounce. */ | |
47 GAIM_SOUND_CHAT_NICK, /**< Someone says your name in a chat. */ | |
48 GAIM_NUM_SOUNDS /**< Total number of sounds. */ | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
49 |
4561 | 50 } GaimSoundEventID; |
51 | |
5684 | 52 typedef struct _GaimSoundUiOps |
53 { | |
54 void (*init)(void); | |
55 void (*shutdown)(void); | |
56 void (*play_file)(const char *filename); | |
57 void (*play_event)(GaimSoundEventID event); | |
58 | |
59 } GaimSoundUiOps; | |
60 | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
61 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
62 extern "C" { |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
63 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
64 |
4561 | 65 /**************************************************************************/ |
66 /** @name Sound API */ | |
67 /**************************************************************************/ | |
68 /*@{*/ | |
69 | |
70 /** | |
5684 | 71 * Sets the UI sound operations |
72 * | |
73 * @param ops The UI sound operations structure. | |
4561 | 74 */ |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
75 void gaim_sound_set_ui_ops(GaimSoundUiOps *ops); |
4561 | 76 |
77 /** | |
5684 | 78 * Gets the UI sound operations |
79 * | |
80 * @return The UI sound operations structure. | |
4561 | 81 */ |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
82 GaimSoundUiOps *gaim_sound_get_ui_ops(void); |
5684 | 83 |
84 /** | |
85 * Initializes the sound subsystem | |
86 */ | |
87 void gaim_sound_init(void); | |
88 | |
89 /** | |
90 * Shuts down the sound subsystem | |
91 */ | |
92 void gaim_sound_shutdown(void); | |
4561 | 93 |
94 /** | |
95 * Plays the specified sound file. | |
96 * | |
97 * @param filename The file to play. | |
98 */ | |
5684 | 99 void gaim_sound_play_file(const char *filename); |
4561 | 100 |
101 /** | |
102 * Plays the sound associated with the specified event. | |
103 * | |
104 * @param event The event. | |
105 */ | |
106 void gaim_sound_play_event(GaimSoundEventID event); | |
107 | |
108 /*@}*/ | |
109 | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
110 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
111 } |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
112 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
113 |
4581 | 114 #endif /* _GAIM_SOUND_H_ */ |