[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/geas/src/methods methods.c
From: |
Daniel E. Baumann |
Subject: |
gnue/geas/src/methods methods.c |
Date: |
Fri, 08 Jun 2001 11:53:53 -0700 |
CVSROOT: /cvs
Module name: gnue
Changes by: Daniel E. Baumann <address@hidden> 01/06/08 11:53:53
Modified files:
geas/src/methods: methods.c
Log message:
Reformat to GNU, add new file header.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/methods/methods.c.diff?cvsroot=OldCVS&tr1=1.7&tr2=1.8&r1=text&r2=text
Patches:
Index: gnue/geas/src/methods/methods.c
diff -u gnue/geas/src/methods/methods.c:1.7 gnue/geas/src/methods/methods.c:1.8
--- gnue/geas/src/methods/methods.c:1.7 Fri May 25 16:46:21 2001
+++ gnue/geas/src/methods/methods.c Fri Jun 8 11:53:53 2001
@@ -1,23 +1,25 @@
-
/*
- geas - GNU Enterprise Application Server
-
- Copyright (C) 2001 Free Software Foundation
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- 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.
-
+ methods.c - Dummy file if method support is not compiled in.
+
+ Copyright (C) 2001 Free Software Foundation
+
+ This file is part of the GNU Enterprise Application Server (GEAS)
+
+ GEAS is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2, or (at your option) any later
+ version.
+
+ GEAS 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 GEAS; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ $Id: methods.c,v 1.8 2001/06/08 18:53:53 baumannd Exp $
*/
#include "config.h"
@@ -37,115 +39,131 @@
/* base data structures and related private utility methods */
typedef struct
{
- char *classname; /* full class name */
- char *methodname; /* name of method field */
- char *cid;
- CORBA_Object object;
- void *extra; /* misc */
- void *function; /* glib */
-} provider_t;
+ char *classname; /* full class name */
+ char *methodname; /* name of method field */
+ char *cid;
+ CORBA_Object object;
+ void *extra; /* misc */
+ void *function; /* glib */
+}
+provider_t;
+
+static provider_t *alloc_provider_data (const char *classname,
+ const char *cid,
+ const char *methodname, void *extra);
-static provider_t *
-alloc_provider_data( const char *classname , const char *cid , const char
*methodname , void *extra );
+static void free_provider_data (provider_t * p);
-static void
-free_provider_data( provider_t *p );
-
#if USE_OAF
- /* use the OAF technique for locating objects */
- #include "methods_oaf.h"
+/* use the OAF technique for locating objects */
+#include "methods_oaf.h"
#elif USE_UNSTABLE_METHODS
- /* use a somewhat unreliable fallback technique */
- #include "methods_unstable.h"
+/* use a somewhat unreliable fallback technique */
+#include "methods_unstable.h"
#elif USE_GLIBMODULE_METHODS
- /* loads glib modules as method sources */
- #include "methods_glibmodule.h"
+/* loads glib modules as method sources */
+#include "methods_glibmodule.h"
#else
/* default functions, if no method code system is selected */
-gboolean initialise_method_handling( configuration config )
+gboolean
+initialise_method_handling (configuration config)
{
- /* this doesn't really do much exciting stuff */
- criticalerror( "No method code handling has been compiled." );
- message( "No business class methods will work." );
+ /* this doesn't really do much exciting stuff */
+ criticalerror ("No method code handling has been compiled.");
+ message ("No business class methods will work.");
}
-gboolean load_method_handlers()
+gboolean
+load_method_handlers ()
{
- /* can't load if we're not ready, and we can't be ready (see above :) */
+ /* can't load if we're not ready, and we can't be ready (see above :) */
}
-gboolean shutdown_method_handling()
+gboolean
+shutdown_method_handling ()
{
- /* no code here */
+ /* no code here */
}
/* assumes everything has been validated already */
-CORBA_char *execute_method( GEAS_object_reference *obj ,
- const char *methodname , GEAS_Arguments *args ,
CORBA_Environment *ev )
+CORBA_char *
+execute_method (GEAS_object_reference * obj,
+ const char *methodname, GEAS_Arguments * args,
+ CORBA_Environment * ev)
{
- /* hi, mom! */
- fatal_error( "No method code handling has been compiled." );
+ /* hi, mom! */
+ fatal_error ("No method code handling has been compiled.");
}
#endif
-static provider_t*
-alloc_provider_data( const char *classname , const char *cid , const char
*methodname , void *extra )
+static provider_t *
+alloc_provider_data (const char *classname, const char *cid,
+ const char *methodname, void *extra)
{
- provider_t *p = g_new0( provider_t , 1 );
- if( p )
- {
- p->classname = NULL;
- p->cid = NULL;
- p->methodname = NULL;
- p->object = CORBA_OBJECT_NIL;
- p->extra = NULL;
- p->function = NULL;
-
- if( classname ) {
- p->classname = g_strdup(classname);
- if( !p->classname ) {
- free_provider_data(p);
- return(NULL);
- }
- }
- if( cid ) {
- p->cid = g_strdup(cid);
- if( !p->cid ) {
- free_provider_data(p);
- return(NULL);
- }
- }
- if( methodname ) {
- p->methodname = g_strdup(methodname);
- if( !p->methodname ) {
- free_provider_data(p);
- return(NULL);
- }
- }
- return( p );
- }
+ provider_t *p = g_new0 (provider_t, 1);
+ if (p)
+ {
+ p->classname = NULL;
+ p->cid = NULL;
+ p->methodname = NULL;
+ p->object = CORBA_OBJECT_NIL;
+ p->extra = NULL;
+ p->function = NULL;
+
+ if (classname)
+ {
+ p->classname = g_strdup (classname);
+ if (!p->classname)
+ {
+ free_provider_data (p);
+ return (NULL);
+ }
+ }
+ if (cid)
+ {
+ p->cid = g_strdup (cid);
+ if (!p->cid)
+ {
+ free_provider_data (p);
+ return (NULL);
+ }
+ }
+ if (methodname)
+ {
+ p->methodname = g_strdup (methodname);
+ if (!p->methodname)
+ {
+ free_provider_data (p);
+ return (NULL);
+ }
+ }
+ return (p);
+ }
}
static void
-free_provider_data( provider_t *p )
+free_provider_data (provider_t * p)
{
- CORBA_Environment ev; /* really just ignoring exceptions */
+ CORBA_Environment ev; /* really just ignoring exceptions */
- CORBA_exception_init(&ev);
- if( p )
- {
- if( p->classname ) g_free( p->classname );
- if( p->cid ) g_free( p->cid );
- if( p->methodname ) g_free( p->methodname );
- if( !CORBA_Object_is_nil(p->object,&ev) ) {
- CORBA_Object_release(p->object,&ev);
- }
- g_free( p );
- }
- CORBA_exception_free(&ev);
+ CORBA_exception_init (&ev);
+ if (p)
+ {
+ if (p->classname)
+ g_free (p->classname);
+ if (p->cid)
+ g_free (p->cid);
+ if (p->methodname)
+ g_free (p->methodname);
+ if (!CORBA_Object_is_nil (p->object, &ev))
+ {
+ CORBA_Object_release (p->object, &ev);
+ }
+ g_free (p);
+ }
+ CORBA_exception_free (&ev);
}
-
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/geas/src/methods methods.c,
Daniel E. Baumann <=