~ubuntu-branches/ubuntu/trusty/syncevolution/trusty-proposed

« back to all changes in this revision

Viewing changes to src/dbus/syncevo-session.h

  • Committer: Bazaar Package Importer
  • Author(s): Tino Keitel
  • Date: 2011-07-20 16:02:02 UTC
  • mfrom: (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110720160202-e8uf7ogw4vh0q0f3
Tags: 1.1.99.5a-1
* New upstream version 1.1.99.5a, first release candiate for 1.2
* Added python-openssl dependency, the HTTP server needs it for HTTPS support
* Added versioned dependency on libsynthesis0 to get required features
* Fixed .orig.tar.gz generation in get-orig-source target
* Added myself to Uploaders:, thanks to David for sponsoring
* Use updated upstream tag for source package generation
* Removed 0001-Replace-with-in-call-to-PKG_CHECK_MODULES.patch, fixed upstream
* Renamed NEWS.Debian to NEWS so that it is actually used
* Updated NEWS for 1.1.99.5a

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2009 Intel Corporation
3
 
 *
4
 
 * This library is free software; you can redistribute it and/or
5
 
 * modify it under the terms of the GNU Lesser General Public
6
 
 * License as published by the Free Software Foundation; either
7
 
 * version 2.1 of the License, or (at your option) version 3.
8
 
 *
9
 
 * This library is distributed in the hope that it will be useful,
10
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
 
 * Lesser General Public License for more details.
13
 
 *
14
 
 * You should have received a copy of the GNU Lesser General Public
15
 
 * License along with this library; if not, write to the Free Software
16
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17
 
 * 02110-1301  USA
18
 
 */
19
 
 
20
 
#ifndef __SYNCEVO_SESSION_H__
21
 
#define __SYNCEVO_SESSION_H__
22
 
 
23
 
#include <glib-object.h>
24
 
#include "syncevo-dbus-types.h"
25
 
 
26
 
G_BEGIN_DECLS 
27
 
 
28
 
enum SyncevoSessionError{
29
 
    SYNCEVO_SESSION_ERROR_NO_DBUS_OBJECT = 1,
30
 
};
31
 
 
32
 
#define SYNCEVO_SESSION_DBUS_SERVICE "org.syncevolution"
33
 
#define SYNCEVO_SESSION_DBUS_INTERFACE "org.syncevolution.Session"
34
 
 
35
 
#define SYNCEVO_TYPE_SESSION (syncevo_session_get_type ())
36
 
#define SYNCEVO_SESSION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SYNCEVO_TYPE_SESSION, SyncevoSession))
37
 
#define SYNCEVO_IS_SESSION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SYNCEVO_TYPE_SESSION))
38
 
 
39
 
typedef struct _SyncevoSession {
40
 
    GObject parent_object;
41
 
} SyncevoSession;
42
 
 
43
 
typedef struct _SyncevoSessionClass {
44
 
    GObjectClass parent_class;
45
 
 
46
 
    void (*status_changed) (SyncevoSession *session,
47
 
                            SyncevoSessionStatus status,
48
 
                            guint error_code,
49
 
                            SyncevoSourceStatuses *source_statuses);
50
 
 
51
 
    void (*progress_changed) (SyncevoSession *session,
52
 
                              int progress,
53
 
                              SyncevoSourceProgresses *source_progresses);
54
 
 
55
 
} SyncevoSessionClass;
56
 
 
57
 
GType syncevo_session_get_type (void);
58
 
 
59
 
typedef void (*SyncevoSessionGenericCb) (SyncevoSession *session,
60
 
                                         GError *error,
61
 
                                         gpointer userdata);
62
 
 
63
 
typedef void (*SyncevoSessionGetConfigCb) (SyncevoSession *session,
64
 
                                           SyncevoConfig *config,
65
 
                                           GError *error,
66
 
                                           gpointer userdata);
67
 
void syncevo_session_get_config (SyncevoSession *session,
68
 
                                 gboolean template,
69
 
                                 SyncevoSessionGetConfigCb callback,
70
 
                                 gpointer userdata);
71
 
 
72
 
void syncevo_session_set_config (SyncevoSession *session,
73
 
                                 gboolean update,
74
 
                                 gboolean temporary,
75
 
                                 SyncevoConfig *config,
76
 
                                 SyncevoSessionGenericCb callback,
77
 
                                 gpointer userdata);
78
 
 
79
 
typedef void (*SyncevoSessionGetReportsCb) (SyncevoSession *session,
80
 
                                            SyncevoReports *reports,
81
 
                                            GError *error,
82
 
                                            gpointer userdata);
83
 
void syncevo_session_get_reports (SyncevoSession *session,
84
 
                                  guint start,
85
 
                                  guint count,
86
 
                                  SyncevoSessionGetReportsCb callback,
87
 
                                  gpointer userdata);
88
 
 
89
 
void syncevo_session_sync (SyncevoSession *session,
90
 
                           SyncevoSyncMode mode,
91
 
                           SyncevoSourceModes *source_modes,
92
 
                           SyncevoSessionGenericCb callback,
93
 
                           gpointer userdata);
94
 
 
95
 
void syncevo_session_abort (SyncevoSession *session,
96
 
                            SyncevoSessionGenericCb callback,
97
 
                            gpointer userdata);
98
 
 
99
 
void syncevo_session_suspend (SyncevoSession *session,
100
 
                              SyncevoSessionGenericCb callback,
101
 
                              gpointer userdata);
102
 
 
103
 
typedef void (*SyncevoSessionGetStatusCb) (SyncevoSession *session,
104
 
                                           SyncevoSessionStatus status,
105
 
                                           guint error_code,
106
 
                                           SyncevoSourceStatuses *source_statuses,
107
 
                                           GError *error,
108
 
                                           gpointer userdata);
109
 
void syncevo_session_get_status (SyncevoSession *session,
110
 
                                 SyncevoSessionGetStatusCb callback,
111
 
                                 gpointer userdata);
112
 
 
113
 
typedef void (*SyncevoSessionGetProgressCb) (SyncevoSession *session,
114
 
                                             guint progress,
115
 
                                             SyncevoSourceProgresses *source_progresses,
116
 
                                             GError *error,
117
 
                                             gpointer userdata);
118
 
void syncevo_session_get_progress (SyncevoSession *session,
119
 
                                   SyncevoSessionGetProgressCb callback,
120
 
                                   gpointer userdata);
121
 
 
122
 
void syncevo_session_check_source (SyncevoSession *session,
123
 
                                   const char *source,
124
 
                                   SyncevoSessionGenericCb callback,
125
 
                                   gpointer userdata);
126
 
 
127
 
void syncevo_session_restore (SyncevoSession *session,
128
 
                              const char *backup_dir,
129
 
                              const gboolean before,
130
 
                              const char **sources,
131
 
                              SyncevoSessionGenericCb callback,
132
 
                              gpointer userdata);
133
 
 
134
 
const char *syncevo_session_get_path (SyncevoSession *session);
135
 
 
136
 
SyncevoSession *syncevo_session_new (const char *path);
137
 
 
138
 
G_END_DECLS
139
 
 
140
 
#endif