Files
evolution/shell/Evolution-Offline.idl
Ettore Perazzoli 3682e0ef1f Remove exception. (cancelSyncFolder): Remove exception.
* Evolution-Offline.idl (syncFolder): Remove exception.
(cancelSyncFolder): Remove exception.

* e-shell-config-offline.c (storage_set_view_has_checkbox_func):
New.
(e_shell_config_offline_create_control): Pass it as the
@has_checkbox_func.

* e-folder.c: New member can_sync_offline in EFolderPrivate.
(init): Init to FALSE.
(e_folder_get_can_sync_offline): New.
(e_folder_to_corba): Set canSyncOffline in the returned CORBA
folder.
(e_folder_set_physical_uri): Protect from when @physical_uri and
->physical_uri are the same thing.
(e_folder_set_description): Same here with description.
(e_folder_set_type_string): And type.

* Evolution-common.idl: New member canSyncOffline in struct
Folder.

svn path=/trunk/; revision=16946
2002-05-20 18:38:10 +00:00

79 lines
2.2 KiB
Plaintext

/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Interface to allow components to switch between on-line and off-line mode.
*
* Authors:
* Ettore Perazzoli <ettore@ximian.com>
*
* Copyright (C) 2001 Ximian, Inc.
*/
#include <Bonobo.h>
module GNOME {
module Evolution {
struct Connection {
string hostName;
string type;
};
typedef sequence<Connection> ConnectionList;
interface OfflineProgressListener {
/* Update the shell about the progress of going off-line. The
operation is considered completed when the ConnectionList is empty. */
void updateProgress (in ConnectionList current_active_connections);
};
interface SyncFolderProgressListener {
/* Report that syncing has progressed. @progress has to be between 0.0
and 1.0. */
void updateProgress (in float progress);
/* Report that the operation has finished. */
void reportSuccess ();
/* Report an error. */
void reportFailure (in string message);
};
interface Offline : Bonobo::Unknown {
exception notPrepared {};
exception notSyncing {};
/* Whether the component is currently off-line. */
attribute boolean isOffline;
/* Ask the component to prepare to go into off-line mode. The
component must return a list of the current active connections.
After this call, the shell is expected to: (in order)
1. Invoke ::syncFolder for each of the component's folders that
need to be synchronized to disk for offline usage.
2. Either invoke ::goOffline (actually complete the operation
and go off-line) or ::goOnline (operation cancelled).
*/
void prepareForOffline (out ConnectionList active_connection_list);
/* Request the component to sync the specified folder. This has to
happen after ::prepareForOffline. */
oneway void syncFolder (in Folder folder,
in SyncFolderProgressListener listener);
/* Request the component to stop syncing the specified folder. This
has to happen after ::syncFolder. */
oneway void cancelSyncFolder (in Folder folder);
/* Ask the component to go into off-line mode. This always comes after
a ::prepareForOffline. */
void goOffline (in OfflineProgressListener listener)
raises (notPrepared);
/* Tell the component to go into on-line mode. */
void goOnline ();
};
};
};