source: trunk/third/evolution/shell/Evolution-Offline.idl @ 18142

Revision 18142, 2.2 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18141, which included commits to RCS files with non-trunk default branches.
Line 
1/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2/*
3 * Interface to allow components to switch between on-line and off-line mode.
4 *
5 * Authors:
6 *   Ettore Perazzoli <ettore@ximian.com>
7 *
8 * Copyright (C) 2001 Ximian, Inc.
9 */
10
11#include <Bonobo.h>
12
13module GNOME {
14module Evolution {
15
16struct Connection {
17        string hostName;
18        string type;
19};
20typedef sequence<Connection> ConnectionList;
21
22interface OfflineProgressListener {
23        /* Update the shell about the progress of going off-line.  The
24           operation is considered completed when the ConnectionList is empty. */
25        void updateProgress (in ConnectionList current_active_connections);
26};
27
28interface SyncFolderProgressListener {
29        /* Report that syncing has progressed.  @progress has to be between 0.0
30           and 1.0.  */
31        void updateProgress (in float progress);
32
33        /* Report that the operation has finished.  */
34        void reportSuccess ();
35
36        /* Report an error.  */
37        void reportFailure (in string message);
38};
39
40interface Offline : Bonobo::Unknown {
41        exception notPrepared {};
42        exception notSyncing {};
43
44        /* Whether the component is currently off-line.  */
45        attribute boolean isOffline;
46
47        /* Ask the component to prepare to go into off-line mode.  The
48           component must return a list of the current active connections.
49           After this call, the shell is expected to: (in order)
50
51                1. Invoke ::syncFolder for each of the component's folders that
52                   need to be synchronized to disk for offline usage.
53
54                2. Either invoke ::goOffline (actually complete the operation
55                   and go off-line) or ::goOnline (operation cancelled).
56        */
57        void prepareForOffline (out ConnectionList active_connection_list);
58
59        /* Request the component to sync the specified folder.  This has to
60           happen after ::prepareForOffline.  */
61        oneway void syncFolder (in Folder folder,
62                                in SyncFolderProgressListener listener);
63
64        /* Request the component to stop syncing the specified folder.  This
65           has to happen after ::syncFolder.  */
66        oneway void cancelSyncFolder (in Folder folder);
67
68        /* Ask the component to go into off-line mode.  This always comes after
69           a ::prepareForOffline. */
70        void goOffline (in OfflineProgressListener listener)
71                raises (notPrepared);
72
73        /* Tell the component to go into on-line mode.  */
74        void goOnline ();
75};
76
77};
78};
Note: See TracBrowser for help on using the repository browser.