From 7f36752a67c274640378ec096f37e690fd5ca8ed Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Fri, 9 Jun 2000 19:19:36 +0000 Subject: Initial support for creating/removing folders. This implies some new IDL methods and new functions to implement on the component side. I have also added a simple folder creation dialog in the shell. It's quite unfinished and untested. svn path=/trunk/; revision=3491 --- shell/evolution-shell-component.h | 58 ++++++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 10 deletions(-) (limited to 'shell/evolution-shell-component.h') diff --git a/shell/evolution-shell-component.h b/shell/evolution-shell-component.h index f60f89f93d..ec049fbd94 100644 --- a/shell/evolution-shell-component.h +++ b/shell/evolution-shell-component.h @@ -21,20 +21,22 @@ * Author: Ettore Perazzoli */ -#ifndef __EVOLUTION_SHELL_COMPONENT_H__ -#define __EVOLUTION_SHELL_COMPONENT_H__ +#ifndef EVOLUTION_SHELL_COMPONENT_H +#define EVOLUTION_SHELL_COMPONENT_H #ifdef HAVE_CONFIG_H #include #endif #include +#include + #include "Evolution.h" -#ifdef __cplusplus +#ifdef cplusplus extern "C" { #pragma } -#endif /* __cplusplus */ +#endif /* cplusplus */ #define EVOLUTION_TYPE_SHELL_COMPONENT (evolution_shell_component_get_type ()) #define EVOLUTION_SHELL_COMPONENT(obj) (GTK_CHECK_CAST ((obj), EVOLUTION_TYPE_SHELL_COMPONENT, EvolutionShellComponent)) @@ -47,9 +49,41 @@ typedef struct _EvolutionShellComponent EvolutionShellComponent; typedef struct _EvolutionShellComponentPrivate EvolutionShellComponentPrivate; typedef struct _EvolutionShellComponentClass EvolutionShellComponentClass; -typedef BonoboControl * (* EvolutionShellComponentCreateViewFn) (EvolutionShellComponent *shell_component, - const char *physical_uri, - void *closure); +enum _EvolutionShellComponentResult { + EVOLUTION_SHELL_COMPONENT_OK, + EVOLUTION_SHELL_COMPONENT_CORBAERROR, + EVOLUTION_SHELL_COMPONENT_INTERRUPTED, + EVOLUTION_SHELL_COMPONENT_INVALIDARG, + EVOLUTION_SHELL_COMPONENT_ALREADYOWNED, + EVOLUTION_SHELL_COMPONENT_NOTOWNED, + EVOLUTION_SHELL_COMPONENT_NOTFOUND, + EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE, + EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDOPERATION, + EVOLUTION_SHELL_COMPONENT_INTERNALERROR, + EVOLUTION_SHELL_COMPONENT_BUSY, + EVOLUTION_SHELL_COMPONENT_EXISTS, + EVOLUTION_SHELL_COMPONENT_INVALIDURI, + EVOLUTION_SHELL_COMPONENT_PERMISSIONDENIED, + EVOLUTION_SHELL_COMPONENT_HASSUBFOLDERS, + EVOLUTION_SHELL_COMPONENT_NOSPACE, + EVOLUTION_SHELL_COMPONENT_UNKNOWNERROR +}; +typedef enum _EvolutionShellComponentResult EvolutionShellComponentResult; + +typedef EvolutionShellComponentResult (* EvolutionShellComponentCreateViewFn) (EvolutionShellComponent *shell_component, + const char *physical_uri, + const char *type, + BonoboControl **control_return, + void *closure); +typedef EvolutionShellComponentResult (* EvolutionShellComponentCreateFolderFn) (EvolutionShellComponent *shell_component, + const char *physical_uri, + const char *type, + const Evolution_ShellComponentListener listener, + void *closure); +typedef EvolutionShellComponentResult (* EvolutionShellComponentRemoveFolderFn) (EvolutionShellComponent *shell_component, + const char *physical_uri, + const Evolution_ShellComponentListener listener, + void *closure); struct _EvolutionShellComponentFolderType { char *name; @@ -79,14 +113,18 @@ void evolution_shell_component_construct (EvolutionShellCom const EvolutionShellComponentFolderType folder_types[], Evolution_ShellComponent corba_object, EvolutionShellComponentCreateViewFn create_view_fn, + EvolutionShellComponentCreateFolderFn create_folder_fn, + EvolutionShellComponentRemoveFolderFn remove_folder_fn, void *closure); EvolutionShellComponent *evolution_shell_component_new (const EvolutionShellComponentFolderType folder_types[], EvolutionShellComponentCreateViewFn create_view_fn, + EvolutionShellComponentCreateFolderFn create_folder_fn, + EvolutionShellComponentRemoveFolderFn remove_folder_fn, void *closure); Evolution_Shell evolution_shell_component_get_owner (EvolutionShellComponent *shell_component); -#ifdef __cplusplus +#ifdef cplusplus } -#endif /* __cplusplus */ +#endif /* cplusplus */ -#endif /* __EVOLUTION_SHELL_COMPONENT_H__ */ +#endif /* EVOLUTION_SHELL_COMPONENT_H */ -- cgit v1.2.3