From bde312e81b08f5909f7190ff93d1405c8e6e1236 Mon Sep 17 00:00:00 2001 From: Jain Vivek Date: Wed, 8 Dec 2004 04:17:19 +0000 Subject: *** empty log message *** svn path=/trunk/; revision=28086 --- plugins/shared-folder/share-folder-common.c | 134 ++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 plugins/shared-folder/share-folder-common.c (limited to 'plugins/shared-folder/share-folder-common.c') diff --git a/plugins/shared-folder/share-folder-common.c b/plugins/shared-folder/share-folder-common.c new file mode 100644 index 0000000000..6bee9cef20 --- /dev/null +++ b/plugins/shared-folder/share-folder-common.c @@ -0,0 +1,134 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Authors: Vivek Jain + * + * Copyright 2004 Novell, 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 Street #330, Boston, MA 02111-1307, USA. + * + */ + +#ifdef HAVE_CONFIG_H +#include +#endif +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "share-folder.h" +#define SELECT_NAMES_OAFID "OAFIID:GNOME_Evolution_Addressbook_SelectNames:" BASE_VERSION + +typedef CORBA_Object GNOME_Evolution_Addressbook_SelectNames; +ShareFolder *common = NULL; + + + +void +shared_folder_check (EPlugin *ep, EConfigTarget *target) +{ + printf ("check **********\n"); +} + + + +void +shared_folder_commit (EPlugin *ep, EConfigTarget *target) +{ + + gchar *mesg = "Folder shared to you"; + gchar *sub = "Shared folder notification"; + ShareFolder *sf; + gchar *check = NULL; + if(common) + share_folder (common); + g_object_run_dispose(common); + + printf ("commit **********\n"); +} + + +void +shared_folder_abort (EPlugin *ep, EConfigTarget *target) +{ + printf ("aborttttttt**********\n"); +} + + + + + + + + +GtkWidget * +org_gnome_shared_folder_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data) +{ + + gchar *folderuri = NULL; + gchar *account = NULL; + gchar *id = NULL; + gchar *sub = NULL; + EGwConnection *cnc; + ShareFolder *sharing_tab; + EMConfigTargetPrefs *target1 = (EMConfigTargetPrefs *) hook_data->config->target; + EMConfigTargetFolder *target2= (EMConfigTargetFolder *)hook_data->config->target; + folderuri=g_strdup(target2->uri); + account = g_strrstr(folderuri, "groupwise"); + if(account) + { + sub = g_strrstr(folderuri, "#"); + if(sub == NULL) + sub = g_strrstr(folderuri, "/"); + sub++; + g_print("\n\nTHE URI OF THE FOLDER%s\n\n %s\n\n",target2->uri,sub); + CamelFolder *folder = target2->folder ; + CamelGroupwiseFolder *gw_folder = CAMEL_GROUPWISE_FOLDER(folder) ; + CamelGroupwiseStore *gw_store = CAMEL_GROUPWISE_STORE (folder->parent_store) ; + CamelGroupwiseStorePrivate *priv = gw_store->priv ; + + id = g_strdup (container_id_lookup(priv,sub)); + cnc = cnc_lookup (priv); + g_free (sub); + g_free (folderuri); + + sharing_tab = share_folder_new (cnc, id); + gtk_notebook_append_page((GtkNotebook *) hook_data->parent, sharing_tab->vbox, gtk_label_new_with_mnemonic N_("Sharing")); + common = sharing_tab; + + + return sharing_tab; + } else + return NULL; + + +} + -- cgit