sound.h

Go to the documentation of this file.
00001 
00007 /* purple
00008  *
00009  * Purple is the legal property of its developers, whose names are too numerous
00010  * to list here.  Please refer to the COPYRIGHT file distributed with this
00011  * source distribution.
00012  *
00013  * This program is free software; you can redistribute it and/or modify
00014  * it under the terms of the GNU General Public License as published by
00015  * the Free Software Foundation; either version 2 of the License, or
00016  * (at your option) any later version.
00017  *
00018  * This program is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  * GNU General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU General Public License
00024  * along with this program; if not, write to the Free Software
00025  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
00026  */
00027 #ifndef _PURPLE_SOUND_H_
00028 #define _PURPLE_SOUND_H_
00029 
00030 #include "account.h"
00031 
00032 /**************************************************************************/
00034 /**************************************************************************/
00035 
00036 
00041 typedef enum _PurpleSoundEventID
00042 {
00043     PURPLE_SOUND_BUDDY_ARRIVE = 0, 
00044     PURPLE_SOUND_BUDDY_LEAVE,      
00045     PURPLE_SOUND_RECEIVE,          
00046     PURPLE_SOUND_FIRST_RECEIVE,    
00047     PURPLE_SOUND_SEND,             
00048     PURPLE_SOUND_CHAT_JOIN,        
00049     PURPLE_SOUND_CHAT_LEAVE,       
00050     PURPLE_SOUND_CHAT_YOU_SAY,     
00051     PURPLE_SOUND_CHAT_SAY,         
00052     PURPLE_SOUND_POUNCE_DEFAULT,   
00053     PURPLE_SOUND_CHAT_NICK,        
00054     PURPLE_NUM_SOUNDS              
00056 } PurpleSoundEventID;
00057 
00061 typedef struct _PurpleSoundUiOps
00062 {
00063     void (*init)(void);
00064     void (*uninit)(void);
00065     void (*play_file)(const char *filename);
00066     void (*play_event)(PurpleSoundEventID event);
00067 
00068     void (*_purple_reserved1)(void);
00069     void (*_purple_reserved2)(void);
00070     void (*_purple_reserved3)(void);
00071     void (*_purple_reserved4)(void);
00072 } PurpleSoundUiOps;
00073 
00074 #ifdef __cplusplus
00075 extern "C" {
00076 #endif
00077 
00078 /**************************************************************************/
00080 /**************************************************************************/
00092 void purple_sound_play_file(const char *filename, const PurpleAccount *account);
00093 
00103 void purple_sound_play_event(PurpleSoundEventID event, const PurpleAccount *account);
00104 
00110 void purple_sound_set_ui_ops(PurpleSoundUiOps *ops);
00111 
00117 PurpleSoundUiOps *purple_sound_get_ui_ops(void);
00118 
00122 void purple_sound_init(void);
00123 
00127 void purple_sound_uninit(void);
00128 
00134 void *purple_sounds_get_handle(void);
00135 
00138 #ifdef __cplusplus
00139 }
00140 #endif
00141 
00142 #endif /* _PURPLE_SOUND_H_ */