summaryrefslogtreecommitdiff
path: root/src/mcd-dbusprop.h
blob: b1d462c53732150c10aa9fa3c1b7c2b3c28f9fb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 8 -*- */
/*
 * This file is part of mission-control
 *
 * Copyright (C) 2008 Nokia Corporation. 
 *
 * Contact: Alberto Mardegan  <alberto.mardegan@nokia.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * version 2.1 as published by the Free Software Foundation.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA
 *
 */

#ifndef __MCD_DBUSPROP_H__
#define __MCD_DBUSPROP_H__

#include <telepathy-glib/svc-generic.h>

G_BEGIN_DECLS

typedef void (*mcd_setprop) (TpSvcDBusProperties *self, const gchar *name,
			     const GValue *value);
typedef void (*mcd_getprop) (TpSvcDBusProperties *self, const gchar *name,
			     GValue *value);

typedef struct _McdDBusProp
{
    const gchar *name;
    mcd_setprop setprop;
    mcd_getprop getprop;
} McdDBusProp;

void dbusprop_set (TpSvcDBusProperties *self,
		   const gchar *interface_name,
		   const gchar *property_name,
		   const GValue *value,
		   DBusGMethodInvocation *context);

void dbusprop_get (TpSvcDBusProperties *self,
		   const gchar *interface_name,
		   const gchar *property_name,
		   DBusGMethodInvocation *context);

void dbusprop_get_all (TpSvcDBusProperties *self,
		       const gchar *interface_name,
		       DBusGMethodInvocation *context);

void dbusprop_add_interface (TpSvcDBusProperties *self,
			     const gchar *interface_name,
			     const McdDBusProp *properties);

G_END_DECLS
#endif /* __MCD_DBUSPROP_H__ */