~cjcurran/indicator-sound/graceful-crashing

« back to all changes in this revision

Viewing changes to src/sound-service-dbus.h

  • Committer: Conor Curran
  • Date: 2010-01-27 13:21:02 UTC
  • Revision ID: conor.curran@canonical.com-20100127132102-xc5w5ob5kei1iblb
copied contents from lp:~cjcurran/wasilla/soundmenu without the noise

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2010 Canonical Ltd.
 
3
 *
 
4
 * Authors:
 
5
 *     Conor Curran <conor.curran@canonical.com>
 
6
 *     Cody Russell <crussell@canonical.com>
 
7
 *
 
8
 * This program is free software: you can redistribute it and/or modify it
 
9
 * under the terms of the GNU General Public License version 3, as published
 
10
 * by the Free Software Foundation.
 
11
 *
 
12
 * This program is distributed in the hope that it will be useful, but
 
13
 * WITHOUT ANY WARRANTY; without even the implied warranties of
 
14
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
15
 * PURPOSE.  See the GNU General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public License along
 
18
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 
19
 */
 
20
 
 
21
#ifndef __SOUND_SERVICE_DBUS_H__
 
22
#define __SOUND_SERVICE_DBUS_H__
 
23
 
 
24
#include <glib.h>
 
25
#include <glib-object.h>
 
26
 
 
27
G_BEGIN_DECLS
 
28
 
 
29
#define SOUND_SERVICE_DBUS_TYPE         (sound_service_dbus_get_type ())
 
30
#define SOUND_SERVICE_DBUS(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), SOUND_SERVICE_DBUS_TYPE, SoundServiceDbus))
 
31
#define SOUND_SERVICE_DBUS_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), SOUND_SERVICE_DBUS_TYPE, SoundServiceDbusClass))
 
32
#define IS_SOUND_SERVICE_DBUS(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), SOUND_SERVICE_DBUS_TYPE))
 
33
#define IS_SOUND_SERVICE_DBUS_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), SOUND_SERVICE_DBUS_TYPE))
 
34
#define SOUND_SERVICE_DBUS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), SOUND_SERVICE_DBUS_TYPE, SoundServiceDbusClass))
 
35
 
 
36
 
 
37
typedef struct _SoundServiceDbus      SoundServiceDbus;
 
38
typedef struct _SoundServiceDbusClass SoundServiceDbusClass;
 
39
typedef struct _SoundData             SoundData;
 
40
 
 
41
struct _SoundData
 
42
{
 
43
  gchar   *client_name;
 
44
  gint64   sink_index;
 
45
  gboolean *muted;
 
46
 
 
47
  SoundServiceDbus *service;
 
48
};
 
49
 
 
50
struct _SoundServiceDbus {
 
51
  GObject parent;
 
52
};
 
53
 
 
54
struct _SoundServiceDbusClass {
 
55
  GObjectClass parent_class;
 
56
  /* Signals -> outward messages*/
 
57
  void (* sink_input_while_muted) (SoundServiceDbus *self, gint sink_index, gboolean is_muted, gpointer sound_data);
 
58
};
 
59
 
 
60
GType sound_service_dbus_get_type  (void) G_GNUC_CONST;
 
61
 
 
62
// Utility methods to get the messages across the into the static function space of sound-service-dbus
 
63
void sound_service_dbus_sink_input_while_muted (SoundServiceDbus* obj, gint sink_index, gboolean value);
 
64
 
 
65
//void sound_service_dbus_sink_volume_changed (SoundServiceDbus* obj, gint volume);
 
66
 
 
67
 
 
68
G_END_DECLS
 
69
 
 
70
#endif