~chipaca/ubuntuone-client/u1sdtool-imports-tools-too

523.2.9 by Rodrigo Moya
Add SyncdaemonConfigInterface class
1
/*
2
 * Syncdaemon API
3
 *
4
 * Authors: Rodrigo Moya <rodrigo.moya@canonical.com>
5
 *
6
 * Copyright 2010 Canonical Ltd.
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
22
#ifndef __SYNCDAEMON_CONFIG_INTERFACE_H__
23
#define __SYNCDAEMON_CONFIG_INTERFACE_H__
24
531.1.1 by Rodrigo Moya
Move all signals to the main Daemon object, since the interface objects get removed/recreated when syncdaemon restarts
25
#include "syncdaemon-daemon.h"
523.2.9 by Rodrigo Moya
Add SyncdaemonConfigInterface class
26
#include "syncdaemon-interface.h"
27
28
G_BEGIN_DECLS
29
30
#define SYNCDAEMON_TYPE_CONFIG_INTERFACE                (syncdaemon_config_interface_get_type ())
31
#define SYNCDAEMON_CONFIG_INTERFACE(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNCDAEMON_TYPE_CONFIG_INTERFACE, SyncdaemonConfigInterface))
32
#define SYNCDAEMON_IS_CONFIG_INTERFACE(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNCDAEMON_TYPE_CONFIG_INTERFACE))
33
#define SYNCDAEMON_CONFIG_INTERFACE_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST ((klass), SYNCDAEMON_TYPE_CONFIG_INTERFACE, SyncdaemonConfigInterfaceClass))
34
#define SYNCDAEMON_IS_CONFIG_INTERFACE_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNCDAEMON_TYPE_CONFIG_INTERFACE))
35
#define SYNCDAEMON_CONFIG_INTERFACE_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNCDAEMON_TYPE_CONFIG_INTERFACE, SyncdaemonConfigInterfaceClass))
36
37
typedef struct _SyncdaemonConfigInterfacePrivate SyncdaemonConfigInterfacePrivate;
38
39
typedef struct {
40
	SyncdaemonInterface parent;
41
	SyncdaemonConfigInterfacePrivate *priv;
42
} SyncdaemonConfigInterface;
43
44
typedef struct {
45
	SyncdaemonInterfaceClass parent_class;
46
} SyncdaemonConfigInterfaceClass;
47
48
GType                      syncdaemon_config_interface_get_type (void);
49
531.1.1 by Rodrigo Moya
Move all signals to the main Daemon object, since the interface objects get removed/recreated when syncdaemon restarts
50
SyncdaemonConfigInterface *syncdaemon_config_interface_new (SyncdaemonDaemon *daemon);
523.2.9 by Rodrigo Moya
Add SyncdaemonConfigInterface class
51
52
gboolean                   syncdaemon_config_interface_get_bandwidth_throttling (SyncdaemonConfigInterface *interface);
53
void                       syncdaemon_config_interface_set_bandwidth_throttling (SyncdaemonConfigInterface *interface,
54
										 gboolean enabled);
55
gboolean                   syncdaemon_config_interface_get_files_sync (SyncdaemonConfigInterface *interface);
56
void                       syncdaemon_config_interface_set_files_sync (SyncdaemonConfigInterface *interface,
57
								       gboolean enabled);
58
void                       syncdaemon_config_interface_get_throttling_limits (SyncdaemonConfigInterface *interface,
59
									      gint *download,
60
									      gint *upload);
61
void                       syncdaemon_config_interface_set_throttling_limits (SyncdaemonConfigInterface *interface,
62
									      gint download,
63
									      gint upload);
64
gboolean                   syncdaemon_config_interface_get_udf_autosubscribe (SyncdaemonConfigInterface *interface);
65
void                       syncdaemon_config_interface_set_udf_autosubscribe (SyncdaemonConfigInterface *interface,
66
									      gboolean enabled);
67
68
G_END_DECLS
69
70
#endif