/* Wombat client library * * Copyright (C) 2001 Ximian, Inc. * * Author: Rodrigo Moya * * 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. */ #include "wombat-client.h" #define PARENT_TYPE BONOBO_X_OBJECT_TYPE struct _WombatClientPrivate { WombatClientGetPasswordFn get_password; WombatClientForgetPasswordFn forget_password; gpointer fn_data; }; static void wombat_client_class_init (WombatClientClass *klass); static void wombat_client_init (WombatClient *client); static void wombat_client_destroy (GtkObject *objct); /* * CORBA interface implementation */ static CORBA_char * impl_GNOME_Evolution_WombatClient_getPassword (PortableServer_Servant servant, const CORBA_char *prompt, const CORBA_char *key, CORBA_Environment *ev) { WombatClient *client; client = WOMBAT_CLIENT (bonobo_x_object (servant)); g_return_val_if_fail (WOMBAT_IS_CLIENT (client), NULL); g_return_val_if_fail (client->priv != NULL, NULL); if (client->priv->get_password != NULL) return client->priv->get_password (client, prompt, key, client->priv->fn_data); return NULL; } static void impl_GNOME_Evolution_WombatClient_forgetPassword (PortableServer_Servant servant, const CORBA_char *key, CORBA_Environment *ev) { WombatClient *client; client = WOMBAT_CLIENT (bonobo_x_object (servant)); g_return_if_fail (WOMBAT_IS_CLIENT (client)); g_return_if_fail (client->priv != NULL); if (client->priv->forget_password != NULL) client->priv->forget_password (client, key, client->priv->fn_data); } /* * WombatClient class implementation */ static void wombat_client_class_init (WombatClientClass *klass) { GtkObjectClass *object_class = GTK_OBJECT_CLASS(klass); POA_GNOME_Evolution_WombatClient__epv *epv = &klass->epv; object_class->destroy = wombat_client_destroy; epv->getPassword = impl_GNOME_Evolution_WombatClient_getPassword; epv->forgetPassword = impl_GNOME_Evolution_WombatClient_forgetPassword; } static void wombat_client_init (WombatClient *client) { client->priv = g_new0 (WombatClientPrivate, 1); } static void wombat_client_destroy (GtkObject *object) { GtkObjectClass *parent_class; WombatClient *client = (WombatClient *) object; g_return_if_fail (WOMBAT_IS_CLIENT (client)); /* free memory */ if (client->priv != NULL) { g_free (client->priv); } /* call parent class' destroy handler */ parent_class = GTK_OBJECT_CLASS (gtk_type_class (PARENT_TYPE)); if (parent_class->destroy != NULL) parent_class->destroy (GTK_OBJECT(client)); } /** * wombat_client_get_type */ GtkType wombat_client_get_type (void) { static GtkType type = 0; if (!type) { GtkTypeInfo info = { "WombatClient", sizeof (WombatClient), sizeof (WombatClientClass), (GtkClassInitFunc) wombat_client_class_init, (GtkObjectInitFunc) wombat_client_init, (GtkArgSetFunc) NULL, (GtkArgSetFunc) NULL }; type = bonobo_x_type_unique( PARENT_TYPE, POA_GNOME_Evolution_WombatClient__init, NULL, GTK_STRUCT_OFFSET (WombatClientClass, epv), &info); } return type; } /** * wombat_client_construct */ WombatClient * wombat_client_construct (WombatClient *client, WombatClientGetPasswordFn get_password_fn, WombatClientForgetPasswordFn forget_password_fn, gpointer fn_data) { g_return_val_if_fail (WOMBAT_IS_CLIENT (client), NULL); g_return_val_if_fail (client->priv != NULL, NULL); client->priv->get_password = get_password_fn; client->priv->forget_password = forget_password_fn; client->priv->fn_data = fn_data; return client; } /** * wombat_client_new */ WombatClient * wombat_client_new (WombatClientGetPasswordFn get_password_fn, WombatClientForgetPasswordFn forget_password_fn, gpointer fn_data) { WombatClient *client; client = WOMBAT_CLIENT (gtk_type_new (WOMBAT_TYPE_CLIENT)); return wombat_client_construct (client, get_password_fn, forget_password_fn, fn_data); } 'submit' value='switch'/> FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
path: root/chinese/qterm
Commit message (Expand)AuthorAgeFilesLines
* - update to 1.4.1dinoex2010-03-281-1/+1
* - Update MASTER_SITESmiwi2010-02-131-3/+1
* - update to jpeg-8dinoex2010-02-051-1/+1
* For ports maintained by ports@FreeBSD.org, remove names and/ordougb2009-12-211-2/+0
* - Get rip python 2.3+miwi2009-12-141-1/+1
* - Switch SourceForge ports to the new File Release System: categories startin...amdmi32009-08-221-2/+2
* Reset maintainererwin2009-08-201-1/+1
* - bump all port that indirectly depends on libjpeg and have not yet been bump...dinoex2009-07-311-1/+1
* - Update X.org ports to 7.4+ (few ports are more recent than the katamari).flz2009-01-241-1/+1
* Update CONFIGURE_ARGS for how we pass CONFIGURE_TARGET to configure script.rafan2008-08-211-1/+0
* Bump portrevision due to upgrade of devel/gettext.edwin2008-06-061-1/+1
* - Remove unneeded dependency from gtk12/gtk20 [1]miwi2008-04-201-2/+4
* - Update to 0.4.1lwhsu2008-03-062-5/+4
* - Add missed dependency on perlpav2007-12-151-7/+2
* - Welcome X.org 7.2 \o/.flz2007-05-201-1/+1
* - Does not build on 4.xclsung2006-08-101-1/+7
* 1. make qterm.cfg & address.cfg writable by default since native linux versio...clsung2006-08-042-3/+6
* - upgrade from 0.4.0-pre2 to 0.4.0-releaseclsung2006-08-0110-66/+65
* - fix compiling problemclsung2006-07-251-1/+3
* remove USE_REINPLACE for all ports with categories starting with Cedwin2006-05-041-1/+0
* SHA256ifyedwin2006-01-22