~ubuntu-branches/ubuntu/trusty/indicator-sync/trusty

« back to all changes in this revision

Viewing changes to indicator-sync/sync-client.h

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2012-08-28 16:25:25 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120828162525-v3mx9o332fqrseu8
Tags: 12.10.1-0ubuntu1
* New upstream release.
* debian/control:
  - rename gir1.2-syncclient-12.10 to gir1.2-syncmenu-0.1.
  - rename libindicator-sync-client1 to libsync-menu1.
  - rename libindicator-sync-client-dev to libsync-menu-dev.
  - add gir1.2-dbusmenu-glib-0.4 to Build-Depends.
  - add dbus-test-runner to Build-Depends.
* debian/*.install:
  - rename files as per package name changes.
  - update libsync-menu-dev.install to the library name.
  - update libsync-menu1.install to the library name.
  - update libsync-menu1.symbols to the library name.
  - rename /usr/include/indicator-sync-0.1 to /usr/include/sync-menu-0.1.
* debian/patches/upstream-soname-versioning.patch,
  debian/patches/upstream-pkgconfig-fixes.patch: dropped, no longer needed.
* debian/libsync-menu1.symbols:
  - update symbols that were renamed; keep the old ones as missing.
* debian/patches/upstream-watchers-client-test.patch: fix up the client test
  to avoid failing due to watchers not being allowed to connect.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
   The way for apps to interact with the Sync Indicator
3
 
 
4
 
   Copyright 2012 Canonical Ltd.
5
 
 
6
 
   Authors:
7
 
     Charles Kerr <charles.kerr@canonical.com>
8
 
 
9
 
   This program is free software: you can redistribute it and/or modify it 
10
 
   under the terms of the GNU General Public License version 3,
11
 
   as published by the Free Software Foundation.
12
 
 
13
 
   This program is distributed in the hope that it will be useful,
14
 
   but WITHOUT ANY WARRANTY; without even the implied warranties of
15
 
   MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.
16
 
   See the GNU General Public License for more details.
17
 
 
18
 
   You should have received a copy of the GNU General Public License along 
19
 
   with this program.  If not, see <http://www.gnu.org/licenses/>.
20
 
*/
21
 
 
22
 
#ifndef __SYNC_CLIENT_H__
23
 
#define __SYNC_CLIENT_H__
24
 
 
25
 
#include <glib.h>
26
 
#include <glib-object.h>
27
 
#include <libdbusmenu-glib/dbusmenu-glib.h>
28
 
#include <indicator-sync/sync-enum.h>
29
 
 
30
 
G_BEGIN_DECLS
31
 
 
32
 
/***
33
 
****  GObject boilerplate
34
 
***/
35
 
 
36
 
GType sync_client_get_type (void) G_GNUC_CONST;
37
 
 
38
 
typedef struct _SyncMenuClient SyncMenuClient;
39
 
 
40
 
#define SYNC_CLIENT_TYPE            (sync_client_get_type ())
41
 
#define SYNC_CLIENT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNC_CLIENT_TYPE, SyncClient))
42
 
#define SYNC_CLIENT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), SYNC_CLIENT_TYPE, SyncClientClass))
43
 
#define IS_SYNC_CLIENT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNC_CLIENT_TYPE))
44
 
#define IS_SYNC_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNC_CLIENT_TYPE))
45
 
#define SYNC_CLIENT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNC_CLIENT_TYPE, SyncClientClass))
46
 
 
47
 
#define SYNC_CLIENT_PROP_DESKTOP_ID  "desktop-id"
48
 
#define SYNC_CLIENT_PROP_STATE       "state"
49
 
#define SYNC_CLIENT_PROP_PAUSED      "paused"
50
 
#define SYNC_CLIENT_PROP_DBUSMENU    "dbusmenu"
51
 
 
52
 
typedef struct _SyncClientClass    SyncClientClass;
53
 
typedef struct _SyncClient         SyncClient;
54
 
typedef struct _SyncClientPriv     SyncClientPriv;
55
 
 
56
 
struct _SyncClientClass
57
 
{
58
 
  /*< private >*/
59
 
  GObjectClass parent;
60
 
 
61
 
  /* reserved for future use */
62
 
  void (*sync_client_reserved1)(void);
63
 
  void (*sync_client_reserved2)(void);
64
 
  void (*sync_client_reserved3)(void);
65
 
  void (*sync_client_reserved4)(void);
66
 
};
67
 
 
68
 
struct _SyncClient
69
 
{
70
 
  /*< private >*/
71
 
  GObject parent;
72
 
  SyncClientPriv * priv;
73
 
};
74
 
 
75
 
/***
76
 
****
77
 
***/
78
 
 
79
 
SyncClient * sync_client_new (const char * desktop_id);
80
 
 
81
 
void sync_client_set_state (SyncClient * client, SyncState state);
82
 
 
83
 
void sync_client_set_paused (SyncClient * client, gboolean paused);
84
 
 
85
 
void sync_client_set_menu (SyncClient * client, DbusmenuServer * menu_server);
86
 
 
87
 
SyncState sync_client_get_state (SyncClient * client);
88
 
 
89
 
gboolean sync_client_get_paused (SyncClient * client);
90
 
 
91
 
DbusmenuServer * sync_client_get_menu (SyncClient * client);
92
 
 
93
 
const gchar * sync_client_get_desktop_id (SyncClient * client);
94
 
 
95
 
/**
96
 
 * SYNC_PROGRESS_MENUITEM_TYPE:
97
 
 *
98
 
 * A value for %DBUSMENU_MENUITEM_PROP_TYPE to create a #DbusmenuMenuitem
99
 
 * that represents some task that has a progress state associated with it.
100
 
 * For example, this could be used for showing a file while it's in the
101
 
 * process of being synchronized.
102
 
 **/
103
 
#define SYNC_PROGRESS_MENUITEM_TYPE               "sync-progress-item"
104
 
 
105
 
/**
106
 
 * SYNC_PROGRESS_MENUITEM_PROP_PERCENT_DONE:
107
 
 *
108
 
 * #DbusmenuMenuitem property that says what percent done this item is.
109
 
 * Should be an integer in the range [0..100]
110
 
 * Type: %G_VARIANT_TYPE_INT32
111
 
 */
112
 
#define SYNC_PROGRESS_MENUITEM_PROP_PERCENT_DONE  "percent-done"
113
 
 
114
 
G_END_DECLS
115
 
 
116
 
#endif
117