~seb128/indicator-power/use-universe-translations

« back to all changes in this revision

Viewing changes to src/sound-player.h

  • Committer: CI Train Bot
  • Author(s): Charles Kerr, charles kerr
  • Date: 2016-01-05 14:37:48 UTC
  • mfrom: (290.1.24 lp-1470767-low-battery-sound)
  • Revision ID: ci-train-bot@canonical.com-20160105143748-8vkmb6yhgz603fus
Play a 'low battery' sound when the low battery notification is shown.
 Fixes: #1470767
Approved by: Ted Gould, PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2016 Canonical Ltd.
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify it
 
5
 * under the terms of the GNU General Public License version 3, as published
 
6
 * by the Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful, but
 
9
 * WITHOUT ANY WARRANTY; without even the implied warranties of
 
10
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
11
 * PURPOSE.  See the GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License along
 
14
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 *
 
16
 * Authors:
 
17
 *   Charles Kerr <charles.kerr@canonical.com>
 
18
 */
 
19
 
 
20
#ifndef __INDICATOR_POWER_SOUND_PLAYER__H__
 
21
#define __INDICATOR_POWER_SOUND_PLAYER__H__
 
22
 
 
23
#include <glib-object.h>
 
24
 
 
25
G_BEGIN_DECLS
 
26
 
 
27
#define INDICATOR_TYPE_POWER_SOUND_PLAYER \
 
28
  (indicator_power_sound_player_get_type ())
 
29
 
 
30
#define INDICATOR_POWER_SOUND_PLAYER(obj) \
 
31
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
 
32
                               INDICATOR_TYPE_POWER_SOUND_PLAYER, \
 
33
                               IndicatorPowerSoundPlayer))
 
34
 
 
35
#define INDICATOR_IS_POWER_SOUND_PLAYER(obj) \
 
36
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_TYPE_POWER_SOUND_PLAYER))
 
37
 
 
38
#define INDICATOR_POWER_SOUND_PLAYER_GET_INTERFACE(inst) \
 
39
  (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
 
40
                                  INDICATOR_TYPE_POWER_SOUND_PLAYER, \
 
41
                                  IndicatorPowerSoundPlayerInterface))
 
42
 
 
43
typedef struct _IndicatorPowerSoundPlayer
 
44
                IndicatorPowerSoundPlayer;
 
45
 
 
46
typedef struct _IndicatorPowerSoundPlayerInterface
 
47
                IndicatorPowerSoundPlayerInterface;
 
48
 
 
49
/**
 
50
 * An interface class for an object that plays sounds.
 
51
 */
 
52
struct _IndicatorPowerSoundPlayerInterface
 
53
{
 
54
  GTypeInterface parent_iface;
 
55
 
 
56
  /* virtual functions */
 
57
  void (*play_uri) (IndicatorPowerSoundPlayer * self,
 
58
                    const gchar * uri);
 
59
};
 
60
 
 
61
GType indicator_power_sound_player_get_type (void);
 
62
 
 
63
/***
 
64
****
 
65
***/
 
66
 
 
67
void indicator_power_sound_player_play_uri (IndicatorPowerSoundPlayer * self,
 
68
                                            const gchar * uri);
 
69
 
 
70
G_END_DECLS
 
71
 
 
72
#endif /* __INDICATOR_POWER_SOUND_PLAYER__H__ */