Files
evolution/shell/e-storage-set.h
Dan Winship 45fd176750 Calls e_shell_command_remove_shared_folder. (file_verbs): Set up
* e-shell-view-menu.c (command_remove_other_users_folder): Calls
	e_shell_command_remove_shared_folder.
	(file_verbs): Set up command_remove_other_users_folder.

	* e-shell-folder-commands.c
	(e_shell_command_remove_shared_folder): New. Calls
	e_storage_set_async_remove_shared_folder with a callback to pop up
	an error dialog if it fails.

	* e-storage-set.c (e_storage_set_async_remove_shared_folder):
	Implement. Mostly like async_remove_folder.

	* e-storage.c (e_storage_supports_shared_folders,
	e_storage_async_discover_shared_folder,
	e_storage_async_remove_shared_folder): New methods. Default
	implementations return FALSE, NOTIMPLEMENTED, and NOTIMPLEMENTED.

	* e-corba-storage.c (supports_shared_folders,
	async_discover_shared_folder, async_remove_shared_folder):
	Implement using CORBA.

	* Evolution-Storage.idl: add Storage_asyncRemoveSharedFolder

	* e-shell-shared-folder-picker-dialog.c: Remove all the CORBA
	stuff from here and use the new EStorage methods.
	(setup_server_option_menu): Use e_storage_supports_shared_folders.
	(discover_folder): Use e_storage_async_discover_shared_folder.

	* evolution-storage.c (impl_Storage_asyncRemoveSharedFolder):
	Implement this by emitting a REMOVE_SHARED_FOLDER signal.
	(impl_Storage_asyncDiscoverSharedFolder): Make the
	DISCOVER_SHARED_FOLDER signal put the Bonobo_Listener first like
	all the other signals do.
	(class_init): Set up REMOVE_SHARED_FOLDER signal.

svn path=/trunk/; revision=18265
2002-09-30 18:41:05 +00:00

124 lines
4.8 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* e-storage-set.h
*
* Copyright (C) 2000 Ximian, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Author: Ettore Perazzoli
*/
#ifndef _E_STORAGE_SET_H_
#define _E_STORAGE_SET_H_
#include <gtk/gtkwidget.h>
#include <bonobo/bonobo-ui-container.h>
#include "e-folder-type-registry.h"
#include "e-storage.h"
#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus */
#define E_TYPE_STORAGE_SET (e_storage_set_get_type ())
#define E_STORAGE_SET(obj) (GTK_CHECK_CAST ((obj), E_TYPE_STORAGE_SET, EStorageSet))
#define E_STORAGE_SET_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_STORAGE_SET, EStorageSetClass))
#define E_IS_STORAGE_SET(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_STORAGE_SET))
#define E_IS_STORAGE_SET_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_STORAGE_SET))
typedef struct _EStorageSet EStorageSet;
typedef struct _EStorageSetPrivate EStorageSetPrivate;
typedef struct _EStorageSetClass EStorageSetClass;
typedef void (* EStorageSetResultCallback) (EStorageSet *storage_set, EStorageResult result, void *data);
struct _EStorageSet {
GtkObject parent;
EStorageSetPrivate *priv;
};
struct _EStorageSetClass {
GtkObjectClass parent_class;
/* Signals. */
void (* new_storage) (EStorageSet *storage_set, EStorage *storage);
void (* removed_storage) (EStorageSet *storage_set, EStorage *storage);
/* FIXME? Inconsistency between storage and folders. */
void (* new_folder) (EStorageSet *storage_set, const char *path);
void (* updated_folder) (EStorageSet *storage_set, const char *path);
void (* removed_folder) (EStorageSet *storage_set, const char *path);
void (* moved_folder) (EStorageSet *storage_set, const char *source_path, const char *destination_path);
void (* close_folder) (EStorageSet *storage_set, const char *path);
};
GtkType e_storage_set_get_type (void);
void e_storage_set_construct (EStorageSet *storage_set,
EFolderTypeRegistry *folder_type_registry);
EStorageSet *e_storage_set_new (EFolderTypeRegistry *folder_type_registry);
gboolean e_storage_set_add_storage (EStorageSet *storage_set,
EStorage *storage);
gboolean e_storage_set_remove_storage (EStorageSet *storage_set,
EStorage *storage);
void e_storage_set_remove_all_storages (EStorageSet *storage_set);
GList *e_storage_set_get_storage_list (EStorageSet *storage_set);
EStorage *e_storage_set_get_storage (EStorageSet *storage_set,
const char *storage_name);
EFolder *e_storage_set_get_folder (EStorageSet *storage_set,
const char *path);
GtkWidget *e_storage_set_create_new_view (EStorageSet *storage_set,
BonoboUIContainer *container);
void e_storage_set_async_create_folder (EStorageSet *storage_set,
const char *path,
const char *type,
const char *description,
EStorageSetResultCallback callback,
void *data);
void e_storage_set_async_remove_folder (EStorageSet *storage_set,
const char *path,
EStorageSetResultCallback callback,
void *data);
void e_storage_set_async_xfer_folder (EStorageSet *storage_set,
const char *source_path,
const char *destination_path,
gboolean remove_source,
EStorageSetResultCallback callback,
void *data);
void e_storage_set_async_remove_shared_folder (EStorageSet *storage_set,
const char *path,
EStorageSetResultCallback callback,
void *data);
EFolderTypeRegistry *e_storage_set_get_folder_type_registry (EStorageSet *storage_set);
/* Utility functions. */
char *e_storage_set_get_path_for_physical_uri (EStorageSet *storage_set,
const char *physical_uri);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _E_STORAGE_SET_H_ */