sound.h
Go to the documentation of this file.
/* purple
*
* Purple is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#ifndef _PURPLE_SOUND_H_
#define _PURPLE_SOUND_H_
#include "account.h"
/**************************************************************************/
/**************************************************************************/
typedef enum _PurpleSoundEventID
{
PURPLE_SOUND_BUDDY_ARRIVE = 0,
PURPLE_SOUND_BUDDY_LEAVE,
PURPLE_SOUND_RECEIVE,
PURPLE_SOUND_FIRST_RECEIVE,
PURPLE_SOUND_SEND,
PURPLE_SOUND_CHAT_JOIN,
PURPLE_SOUND_CHAT_LEAVE,
PURPLE_SOUND_CHAT_YOU_SAY,
PURPLE_SOUND_CHAT_SAY,
PURPLE_SOUND_POUNCE_DEFAULT,
PURPLE_SOUND_CHAT_NICK,
PURPLE_SOUND_GOT_ATTENTION,
PURPLE_NUM_SOUNDS
} PurpleSoundEventID;
typedef struct _PurpleSoundUiOps
{
void (*init)(void);
void (*uninit)(void);
void (*play_file)(const char *filename);
void (*play_event)(PurpleSoundEventID event);
void (*_purple_reserved1)(void);
void (*_purple_reserved2)(void);
void (*_purple_reserved3)(void);
void (*_purple_reserved4)(void);
} PurpleSoundUiOps;
#ifdef __cplusplus
extern "C" {
#endif
/**************************************************************************/
/**************************************************************************/
void purple_sound_play_file(const char *filename, const PurpleAccount *account);
void purple_sound_play_event(PurpleSoundEventID event, const PurpleAccount *account);
void purple_sound_set_ui_ops(PurpleSoundUiOps *ops);
PurpleSoundUiOps *purple_sound_get_ui_ops(void);
void purple_sound_init(void);
void purple_sound_uninit(void);
void *purple_sounds_get_handle(void);
#ifdef __cplusplus
}
#endif
#endif /* _PURPLE_SOUND_H_ */
PURPLE_SOUND_POUNCE_DEFAULT
Default sound for a buddy pounce.
Definition: sound.h:52
PurpleSoundUiOps
struct _PurpleSoundUiOps PurpleSoundUiOps
Operations used by the core to request that particular sound files, or the sound associated with a pa...
PURPLE_SOUND_RECEIVE
Receive an IM.
Definition: sound.h:45
purple_sounds_get_handle
void * purple_sounds_get_handle(void)
Returns the sound subsystem handle.
PURPLE_SOUND_BUDDY_ARRIVE
Buddy signs on.
Definition: sound.h:43
PURPLE_SOUND_CHAT_LEAVE
Someone leaves a chat.
Definition: sound.h:49
_PurpleAccount
Structure representing an account.
Definition: account.h:126
PURPLE_NUM_SOUNDS
Total number of sounds.
Definition: sound.h:55
PURPLE_SOUND_CHAT_YOU_SAY
You say something in a chat.
Definition: sound.h:50
_PurpleSoundEventID
_PurpleSoundEventID
Data Structures.
Definition: sound.h:41
purple_sound_play_event
void purple_sound_play_event(PurpleSoundEventID event, const PurpleAccount *account)
Plays the sound associated with the specified event.
_PurpleSoundUiOps
Operations used by the core to request that particular sound files, or the sound associated with a pa...
Definition: sound.h:62
purple_sound_init
void purple_sound_init(void)
Initializes the sound subsystem.
PURPLE_SOUND_GOT_ATTENTION
Got an attention.
Definition: sound.h:54
PURPLE_SOUND_CHAT_JOIN
Someone joins a chat.
Definition: sound.h:48
PURPLE_SOUND_FIRST_RECEIVE
Receive an IM that starts a conv.
Definition: sound.h:46
purple_sound_get_ui_ops
PurpleSoundUiOps * purple_sound_get_ui_ops(void)
Gets the UI sound operations.
PURPLE_SOUND_CHAT_NICK
Someone says your name in a chat.
Definition: sound.h:53
account.h
Account API.
purple_sound_set_ui_ops
void purple_sound_set_ui_ops(PurpleSoundUiOps *ops)
Sets the UI sound operations.
purple_sound_play_file
void purple_sound_play_file(const char *filename, const PurpleAccount *account)
Plays the specified sound file.
PURPLE_SOUND_SEND
Send an IM.
Definition: sound.h:47
PurpleSoundEventID
enum _PurpleSoundEventID PurpleSoundEventID
Data Structures.
PURPLE_SOUND_CHAT_SAY
Someone else says somthing in a chat.
Definition: sound.h:51
purple_sound_uninit
void purple_sound_uninit(void)
Shuts down the sound subsystem.
PURPLE_SOUND_BUDDY_LEAVE
Buddy signs off.
Definition: sound.h:44