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 
00058 typedef struct _PurpleSoundUiOps
00059 {
00060     void (*init)(void);
00061     void (*uninit)(void);
00062     void (*play_file)(const char *filename);
00063     void (*play_event)(PurpleSoundEventID event);
00064 
00065     void (*_purple_reserved1)(void);
00066     void (*_purple_reserved2)(void);
00067     void (*_purple_reserved3)(void);
00068     void (*_purple_reserved4)(void);
00069 } PurpleSoundUiOps;
00070 
00071 #ifdef __cplusplus
00072 extern "C" {
00073 #endif
00074 
00075 /**************************************************************************/
00077 /**************************************************************************/
00089 void purple_sound_play_file(const char *filename, const PurpleAccount *account);
00090 
00100 void purple_sound_play_event(PurpleSoundEventID event, const PurpleAccount *account);
00101 
00107 void purple_sound_set_ui_ops(PurpleSoundUiOps *ops);
00108 
00114 PurpleSoundUiOps *purple_sound_get_ui_ops(void);
00115 
00119 void purple_sound_init(void);
00120 
00124 void purple_sound_uninit(void);
00125 
00131 void *purple_sounds_get_handle(void);
00132 
00135 #ifdef __cplusplus
00136 }
00137 #endif
00138 
00139 #endif /* _PURPLE_SOUND_H_ */