sound.h

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