From 483ebae5399d6aa7d63e471ea6000021a4be94fb Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Thu, 3 May 2001 01:10:46 +0000 Subject: Add interfaces to the shell to handle off-line operation, as well as a first (unfinished/untested) implementation for them. svn path=/trunk/; revision=9653 --- shell/evolution-shell-component-client.c | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'shell/evolution-shell-component-client.c') diff --git a/shell/evolution-shell-component-client.c b/shell/evolution-shell-component-client.c index 759e4f6ac4..db92d0efaf 100644 --- a/shell/evolution-shell-component-client.c +++ b/shell/evolution-shell-component-client.c @@ -53,6 +53,7 @@ struct _EvolutionShellComponentClientPrivate { GNOME_Evolution_ShellComponentDnd_SourceFolder dnd_source_folder_interface; GNOME_Evolution_ShellComponentDnd_DestinationFolder dnd_destination_folder_interface; + GNOME_Evolution_Offline offline_interface; }; @@ -295,6 +296,11 @@ impl_destroy (GtkObject *object) CORBA_Object_release (priv->dnd_destination_folder_interface, &ev); } + if (priv->offline_interface != CORBA_OBJECT_NIL) { + Bonobo_Unknown_unref (priv->offline_interface, &ev); + CORBA_Object_release (priv->offline_interface, &ev); + } + CORBA_exception_free (&ev); g_free (priv); @@ -329,6 +335,7 @@ init (EvolutionShellComponentClient *shell_component_client) priv->dnd_source_folder_interface = CORBA_OBJECT_NIL; priv->dnd_destination_folder_interface = CORBA_OBJECT_NIL; + priv->offline_interface = CORBA_OBJECT_NIL; shell_component_client->priv = priv; } @@ -452,6 +459,36 @@ evolution_shell_component_client_get_dnd_destination_interface (EvolutionShellCo return interface; } + +/* Querying the offline interface. */ + +GNOME_Evolution_Offline +evolution_shell_component_client_get_offline_interface (EvolutionShellComponentClient *shell_component_client) +{ + EvolutionShellComponentClientPrivate *priv; + GNOME_Evolution_Offline interface; + CORBA_Environment ev; + + priv = shell_component_client->priv; + + if (priv->offline_interface != CORBA_OBJECT_NIL) + return priv->offline_interface; + + CORBA_exception_init (&ev); + + interface = Bonobo_Unknown_queryInterface (bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client)), + "IDL:GNOME/Evolution/ShellComponent/Offline:1.0", + &ev); + + if (ev._major != CORBA_NO_EXCEPTION) + interface = CORBA_OBJECT_NIL; + + CORBA_exception_free (&ev); + + priv->offline_interface = interface; + return interface; +} + /* Synchronous operations. */ -- cgit v1.2.3