• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ CORBA_exception_init函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中CORBA_exception_init函数的典型用法代码示例。如果您正苦于以下问题:C++ CORBA_exception_init函数的具体用法?C++ CORBA_exception_init怎么用?C++ CORBA_exception_init使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了CORBA_exception_init函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: launch_alarm_daemon_cb

/* Does a simple activation and unreffing of the alarm notification service so
 * that the daemon will be launched if it is not running yet.
 */
static gboolean
launch_alarm_daemon_cb (gpointer data)
{
	CORBA_Environment ev;
	CORBA_Object an;
	guint *idle_id = (guint *) data;

	/* remove the idle function */
	g_source_remove (*idle_id);
	g_free (idle_id);

	/* activate the alarm daemon */
	CORBA_exception_init (&ev);
	an = bonobo_activation_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify:" BASE_VERSION, 0, NULL, &ev);

	if (BONOBO_EX (&ev)) {
		g_message ("launch_alarm_daemon_cb(): %s", bonobo_exception_get_text (&ev));
		CORBA_exception_free (&ev);
		return FALSE;
	}
	CORBA_exception_free (&ev);

	/* Just get rid of it; what we are interested in is that it gets launched */

	CORBA_exception_init (&ev);
	bonobo_object_release_unref (an, &ev);
	if (BONOBO_EX (&ev))
		g_message ("add_alarms(): Could not unref the alarm notification service");

	CORBA_exception_free (&ev);

	return FALSE;
}
开发者ID:mvanderkolff,项目名称:navi-misc,代码行数:36,代码来源:main.c


示例2: set_data_and_props

static void
set_data_and_props (SunOneInvitationList *list, int row) 
{
	SunOneInvitationListPrivate *priv = list->priv;
	BonoboControlFrame *control_frame;
	Bonobo_PropertyBag prop_bag;
	ECalComponent *comp;
	icalcomponent *top_level;
	char *string;
	CORBA_Environment ev;

	if (row == -1) {
		set_data (BONOBO_WIDGET (priv->control), "");
		return;
	}
		
	comp = sunone_invitation_list_model_get_comp (priv->model, row);
	if (!comp)
		return;

	/* Set the from address on the control */
	control_frame = bonobo_widget_get_control_frame (BONOBO_WIDGET (priv->control));
	prop_bag = bonobo_control_frame_get_control_property_bag (control_frame, NULL);		
	if (prop_bag != CORBA_OBJECT_NIL){
		ECalComponentOrganizer organizer;

		CORBA_exception_init (&ev);
		
		e_cal_component_get_organizer (comp, &organizer);
		bonobo_property_bag_client_set_value_string (prop_bag, "from_address", 
							     organizer.value, &ev);


		CORBA_exception_init (&ev);

		bonobo_property_bag_client_set_value_gint (prop_bag, "view_only", 
							   1, &ev);

		Bonobo_Unknown_unref (prop_bag, &ev);
		CORBA_exception_free (&ev);
	}

	/* Send the icalendar code over */
	top_level = toplevel_with_zones (list, comp);
	string = icalcomponent_as_ical_string_r (top_level);
	set_data (BONOBO_WIDGET (priv->control), string);
	g_free (string);
	icalcomponent_free (top_level);
}
开发者ID:GNOME,项目名称:evolution-jescs,代码行数:49,代码来源:sunone-invitation-list.c


示例3: main

int main(int argc, char* argv[]) {
    EchoApp_Echo echo_service = CORBA_OBJECT_NIL;
    CosNaming_NamingContext name_service = CORBA_OBJECT_NIL;

    gchar *id[] = {"EchoApp", "Echo", NULL};

    CORBA_Environment ev[1];
    CORBA_exception_init(ev);

    client_init(&argc, argv, &global_orb, ev);
    etk_abort_if_exception(ev, "init failed");

    g_print("Resolving service reference from name-service with id\"%s\"\n", id[0]);

    name_service = etk_get_name_service(global_orb, ev);
    etk_abort_if_exception(ev, "failed resolving name-service");

    echo_service = (EchoApp_Echo)etk_name_service_resolve(name_service, id, ev);
    etk_abort_if_exception(ev, "failed resolving name service at name-service");

    client_run(echo_service, ev);
    etk_abort_if_exception(ev, "service not reachable");

    client_cleanup(global_orb, echo_service, ev);
    etk_abort_if_exception(ev, "cleanup failed");

    exit(0);
}
开发者ID:utmi-2014,项目名称:utmi-soft3,代码行数:28,代码来源:echo-client.c


示例4: matecomponent_foreign_object_new

MateComponentObject *
matecomponent_foreign_object_new (CORBA_Object corba_objref)
{
	MateComponentObject *object;
	CORBA_Environment ev[1];

	g_return_val_if_fail (corba_objref != CORBA_OBJECT_NIL, NULL);

	CORBA_exception_init (ev);
	if (!CORBA_Object_is_a (corba_objref, "IDL:MateComponent/Unknown:1.0", ev)) {
		if (ev->_major != CORBA_NO_EXCEPTION) {
			char *text = matecomponent_exception_get_text (ev);
			g_warning ("CORBA_Object_is_a: %s", text);
			g_free (text);
		} else
			g_warning ("matecomponent_foreign_object_new: corba_objref"
				   " doesn't have interface MateComponent::Unknown");
		object = NULL;

	} else {
		object = MATECOMPONENT_OBJECT (g_object_new (MATECOMPONENT_TYPE_FOREIGN_OBJECT, NULL));
		object->corba_objref = CORBA_Object_duplicate (corba_objref, NULL);
		matecomponent_running_context_add_object_T (object->corba_objref);
	}
	CORBA_exception_free (ev);

	return object;
}
开发者ID:TheCoffeMaker,项目名称:Mate-Desktop-Environment,代码行数:28,代码来源:matecomponent-foreign-object.c


示例5: MateCORBA_imodule_create_alias_typecode

CORBA_TypeCode
MateCORBA_imodule_create_alias_typecode (GHashTable    *typecodes,
				     IDL_tree       tree,
				     CORBA_TypeCode original_type)
{
	CORBA_Environment env;
	CORBA_TypeCode    retval;

	CORBA_exception_init (&env);

	g_return_val_if_fail (IDL_NODE_TYPE (tree) == IDLN_IDENT, NULL);
	g_return_val_if_fail (g_hash_table_lookup (typecodes,
						   IDL_IDENT (tree).repo_id) == NULL, NULL);

	retval = CORBA_ORB_create_alias_tc (NULL,
			IDL_IDENT (tree).repo_id,
			IDL_IDENT (tree).str,
			original_type, &env);

	MateCORBA_imodule_register_typecode (
			typecodes, IDL_IDENT (tree).repo_id, retval);

	if (env._major != CORBA_NO_EXCEPTION)
		g_warning ("MateCORBA_imodule_create_alias_typecode: exception %s", env._id);

	CORBA_exception_free (&env);

	return retval;
}
开发者ID:TheCoffeMaker,项目名称:Mate-Desktop-Environment,代码行数:29,代码来源:matecorba-imodule-utils.c


示例6: matecomponent_stream_cache_create

/** 
 * matecomponent_stream_cache_create:
 * @cs: a reference to the stream we want to cache
 * @opt_ev: an optional environment
 *
 * Returns a new MateComponentStream object
 */
MateComponentObject *
matecomponent_stream_cache_create (MateComponent_Stream      cs,
			    CORBA_Environment *opt_ev)
{
	MateComponentStreamCache *stream;
	CORBA_Environment  ev, *my_ev;

	matecomponent_return_val_if_fail (cs != NULL, NULL, opt_ev);

	if (!(stream = g_object_new (matecomponent_stream_cache_get_type (), NULL))) {
		if (opt_ev)
			matecomponent_exception_set (opt_ev, ex_MateComponent_Storage_IOError);
		return NULL;
	}
	
	if (!opt_ev) {
		CORBA_exception_init (&ev);
		my_ev = &ev;
	} else
		my_ev = opt_ev;

	stream->priv->cs = matecomponent_object_dup_ref (cs, my_ev);

	if (MATECOMPONENT_EX (my_ev)) {
		if (!opt_ev)
			CORBA_exception_free (&ev);
		matecomponent_object_unref (MATECOMPONENT_OBJECT (stream));
		return NULL;
	}

	if (!opt_ev)
		CORBA_exception_free (&ev);

	return (MateComponentObject *) stream;
}
开发者ID:TheCoffeMaker,项目名称:Mate-Desktop-Environment,代码行数:42,代码来源:matecomponent-stream-cache.c


示例7: impl_xml_rm

static void
impl_xml_rm (BonoboUIComponent  *component,
	     const char         *path,
	     CORBA_Environment  *ev)
{
	BonoboUIComponentPrivate *priv;
	CORBA_Environment *real_ev, tmp_ev;
	Bonobo_UIContainer container;

	container = component->priv->container;
	g_return_if_fail (container != CORBA_OBJECT_NIL);

	if (ev)
		real_ev = ev;
	else {
		CORBA_exception_init (&tmp_ev);
		real_ev = &tmp_ev;
	}

	priv = component->priv;

	Bonobo_UIContainer_removeNode (
		container, path, priv->name, real_ev);

	if (!ev && BONOBO_EX (real_ev))
		g_warning ("Serious exception removing path  '%s' '%s'",
			   path, bonobo_exception_get_text (real_ev));

	if (!ev)
		CORBA_exception_free (&tmp_ev);
}
开发者ID:Distrotech,项目名称:libbonoboui,代码行数:31,代码来源:bonobo-ui-component.c


示例8: bonobo_event_source_client_remove_listener

void
bonobo_event_source_client_remove_listener (Bonobo_Unknown     object,
        Bonobo_Listener    listener,
        CORBA_Environment *opt_ev)
{
    Bonobo_Unknown     es;
    CORBA_Environment *ev, temp_ev;

    g_return_if_fail (object != CORBA_OBJECT_NIL);

    if (!opt_ev) {
        CORBA_exception_init (&temp_ev);
        ev = &temp_ev;
    } else
        ev = opt_ev;

    es = Bonobo_Unknown_queryInterface (object,
                                        "IDL:Bonobo/EventSource:1.0", ev);

    if (!BONOBO_EX (ev) && es) {

        Bonobo_EventSource_removeListener (es, listener, ev);

        Bonobo_Unknown_unref (es, ev);
    }

    if (!opt_ev) {
        if (BONOBO_EX (ev)) {
            char *text = bonobo_exception_get_text (ev);
            g_warning ("remove_listener failed '%s'", text);
            g_free (text);
        }
        CORBA_exception_free (ev);
    }
}
开发者ID:GNOME,项目名称:libbonobo,代码行数:35,代码来源:bonobo-event-source.c


示例9: matecomponent_zoomable_frame_get_preferred_zoom_level_names

GList *
matecomponent_zoomable_frame_get_preferred_zoom_level_names (MateComponentZoomableFrame *zoomable_frame)
{
	CORBA_Environment ev;
	MateComponent_ZoomLevelNameList *zoom_level_names;
	GList *list = NULL;
	int i;

	g_return_val_if_fail (MATECOMPONENT_IS_ZOOMABLE_FRAME (zoomable_frame), NULL);

	CORBA_exception_init (&ev);

	zoom_level_names = MateComponent_Zoomable__get_preferredLevelNames (
		zoomable_frame->priv->zoomable, &ev);

	if (MATECOMPONENT_EX (&ev)) {
		matecomponent_object_check_env (MATECOMPONENT_OBJECT (zoomable_frame),
					 zoomable_frame->priv->zoomable, &ev);
		CORBA_exception_free (&ev);
		return NULL;
	}
	CORBA_exception_free (&ev);

	if (zoom_level_names == CORBA_OBJECT_NIL)
		return NULL;

	for (i = 0; i < zoom_level_names->_length; i++)
		list = g_list_prepend (list, g_strdup (zoom_level_names->_buffer [i]));

	CORBA_free (zoom_level_names);

	return g_list_reverse (list);
}
开发者ID:TheCoffeMaker,项目名称:Mate-Desktop-Environment,代码行数:33,代码来源:matecomponent-zoomable-frame.c


示例10: matecomponent_property_control_changed

/**
 * matecomponent_property_control_changed:
 * @property_control: The MateComponentPropertyControl that has changed.
 * @opt_ev: An optional CORBA_Environment for exception handling. 
 *
 * Tells the server that a value in the property control has been changed,
 * and that it should indicate this somehow.
 */
void
matecomponent_property_control_changed (MateComponentPropertyControl *property_control,
				 CORBA_Environment     *opt_ev)
{
	MateComponentPropertyControlPrivate *priv;
	CORBA_Environment ev;
	CORBA_any any;
	CORBA_short s;

	g_return_if_fail (property_control != NULL);
	g_return_if_fail (MATECOMPONENT_IS_PROPERTY_CONTROL (property_control));

	priv = property_control->priv;

	if (opt_ev == NULL)
		CORBA_exception_init (&ev);
	else
		ev = *opt_ev;

	s = 0;
	any._type = (CORBA_TypeCode) TC_CORBA_short;
	any._value = &s;

	matecomponent_event_source_notify_listeners (priv->event_source,
					      MATECOMPONENT_PROPERTY_CONTROL_CHANGED,
					      &any, &ev);
	if (opt_ev == NULL && MATECOMPONENT_EX (&ev)) {
		g_warning ("ERROR: %s", CORBA_exception_id (&ev));
	}

	if (opt_ev == NULL)
		CORBA_exception_free (&ev);
}
开发者ID:TheCoffeMaker,项目名称:Mate-Desktop-Environment,代码行数:41,代码来源:matecomponent-property-control.c


示例11: matecomponent_zoomable_frame_bind_to_zoomable

/**
 * matecomponent_zoomable_frame_bind_to_zoomable:
 * @zoomable_frame: A MateComponentZoomableFrame object.
 * @zoomable: The CORBA object for the MateComponentZoomable embedded
 * in this MateComponentZoomableFrame.
 *
 * Associates @zoomable with this @zoomable_frame.
 */
void
matecomponent_zoomable_frame_bind_to_zoomable (MateComponentZoomableFrame *zoomable_frame,
					MateComponent_Zoomable      zoomable,
					CORBA_Environment   *opt_ev)
{
	CORBA_Environment *ev, temp_ev;

	g_return_if_fail (zoomable != CORBA_OBJECT_NIL);
	g_return_if_fail (MATECOMPONENT_IS_ZOOMABLE_FRAME (zoomable_frame));

	if (zoomable_frame->priv->zoomable != CORBA_OBJECT_NIL)
		CORBA_Object_release (zoomable_frame->priv->zoomable, NULL);

	zoomable_frame->priv->zoomable = CORBA_Object_duplicate (zoomable, NULL);

	if (!opt_ev) {
		CORBA_exception_init (&temp_ev);
		ev = &temp_ev;
	} else
		ev = opt_ev;

	MateComponent_Zoomable_setFrame (zoomable, MATECOMPONENT_OBJREF (zoomable_frame), ev);

	if (MATECOMPONENT_EX (ev))
		matecomponent_object_check_env (MATECOMPONENT_OBJECT (zoomable_frame), zoomable, ev);

	if (!opt_ev)
		CORBA_exception_free (&temp_ev);
}
开发者ID:TheCoffeMaker,项目名称:Mate-Desktop-Environment,代码行数:37,代码来源:matecomponent-zoomable-frame.c


示例12: get_circle

MateCanvasItem* get_circle(MateCanvasGroup* group)
{
        CORBA_Object server;
        MateCanvasItem *item;
        CORBA_Environment ev;
  
        CORBA_exception_init (&ev);
  
        server = matecomponent_activation_activate_from_id ("OAFIID:CircleItem", 
                0, NULL, &ev);
  
        if (server == CORBA_OBJECT_NIL || MATECOMPONENT_EX (&ev))
        {
                g_warning (_("Could activate Circle: '%s'"),
                              matecomponent_exception_get_text (&ev));
                CORBA_exception_free(&ev);
                exit(0);
        }
        g_print("Got circle component connect.\n");

        item = mate_canvas_item_new (group, matecomponent_canvas_item_get_type (),
                "corba_factory", server, NULL);
  
        /* I think this tells the object it is OK to exit.
           Probably want to call this when I close.
           or matecomponent_object_release_unref(server, &ev)
        CORBA_Object_release(server, &ev);*/
        matecomponent_object_release_unref(server, &ev);
        CORBA_exception_free(&ev);

        return item;
}
开发者ID:TheCoffeMaker,项目名称:Mate-Desktop-Environment,代码行数:32,代码来源:main.c


示例13: get_Wise2Corba_Singleton

Wise2Corba_Singleton * get_Wise2Corba_Singleton(int * argc,char ** argv,char * init_string)
{

  if( static_init_string != NULL ) {
    if( strcmp(static_init_string,init_string) == 0 ) {
      return &singleton;
    } else {
      fprintf(stderr,"Trouble! Asked for orbs of different types %s and %s",init_string,static_init_string);
      return NULL;
    }
  }

  /* else, initiate orb */

  singleton.ev = g_new0(CORBA_Environment,1);

  CORBA_exception_init(singleton.ev);
  singleton.orb = CORBA_ORB_init(argc,argv,init_string,singleton.ev);
  /* FIXME: Exception check! */
  singleton.poa = (PortableServer_POA)CORBA_ORB_resolve_initial_references(singleton.orb,
									   "RootPOA",singleton.ev);

  static_init_string = CORBA_string_dup(init_string);

  return &singleton;
}
开发者ID:PlantandFoodResearch,项目名称:wise2,代码行数:26,代码来源:corba_singleton.c


示例14: impl_set_prop

static void
impl_set_prop (BonoboUIComponent  *component,
	       const char         *path,
	       const char         *prop,
	       const char         *value,
	       CORBA_Environment  *opt_ev)
{
	Bonobo_UIContainer container;
	CORBA_Environment *real_ev, tmp_ev;

	g_return_if_fail (path != NULL);
	g_return_if_fail (prop != NULL);
	g_return_if_fail (value != NULL);

	container = component->priv->container;
	g_return_if_fail (container != CORBA_OBJECT_NIL);

	if (opt_ev)
		real_ev = opt_ev;
	else {
		CORBA_exception_init (&tmp_ev);
		real_ev = &tmp_ev;
	}

	Bonobo_UIContainer_setAttr (
		container, path, prop, value,
		component->priv->name, real_ev);

	if (!opt_ev)
		CORBA_exception_free (&tmp_ev);
}
开发者ID:Distrotech,项目名称:libbonoboui,代码行数:31,代码来源:bonobo-ui-component.c


示例15: dasher_action_speech_activate

static gboolean
dasher_action_speech_activate(DasherAction *pSelf) {
    DasherActionSpeechPrivate *pDasherActionSpeechPrivate = DASHER_ACTION_SPEECH_GET_PRIVATE(pSelf);

    pDasherActionSpeechPrivate->rv = 0;
    Bonobo_ServerInfoList *servers;
    Bonobo_ServerInfo *info;

    servers = bonobo_activation_query("repo_ids.has_one(['IDL:GNOME/Speech/SynthesisDriver:0.2','IDL:GNOME/Speech/SynthesisDriver:0.3'])", NULL, &(pDasherActionSpeechPrivate->ev));

    if(servers->_length == 0) {
        pDasherActionSpeechPrivate->speaker = NULL;
        printf(_("Unable to initialize speech support\n"));
        fflush(stdout);
        return false;
    }

    for(unsigned int i = 0; i < servers->_length; i++) {
        CORBA_exception_init(&(pDasherActionSpeechPrivate->ev));

        info = &servers->_buffer[i];

        pDasherActionSpeechPrivate->rv = bonobo_activation_activate_from_id((const Bonobo_ActivationID)info->iid, 0, NULL, &(pDasherActionSpeechPrivate->ev));
        if(!BONOBO_EX(&(pDasherActionSpeechPrivate->ev))) {
            break;
        }
    }

    CORBA_free(servers);

    GNOME_Speech_SynthesisDriver_driverInit(pDasherActionSpeechPrivate->rv, &(pDasherActionSpeechPrivate->ev));

    pDasherActionSpeechPrivate->voices = GNOME_Speech_SynthesisDriver_getAllVoices(pDasherActionSpeechPrivate->rv, &(pDasherActionSpeechPrivate->ev));

    if(pDasherActionSpeechPrivate->voices == NULL || BONOBO_EX(&(pDasherActionSpeechPrivate->ev)) || pDasherActionSpeechPrivate->voices->_length == 0) {
        g_warning(_("Unable to initialize voices\n"));
        pDasherActionSpeechPrivate->speaker = NULL;
        return false;
    }

    pDasherActionSpeechPrivate->speaker = GNOME_Speech_SynthesisDriver_createSpeaker(pDasherActionSpeechPrivate->rv, &pDasherActionSpeechPrivate->voices->_buffer[0], &(pDasherActionSpeechPrivate->ev));

    GNOME_Speech_ParameterList *list;
    list = GNOME_Speech_Speaker_getSupportedParameters(pDasherActionSpeechPrivate->speaker, &(pDasherActionSpeechPrivate->ev));
    if(BONOBO_EX(&(pDasherActionSpeechPrivate->ev)) || list->_length == 0) {
        if(!BONOBO_EX(&(pDasherActionSpeechPrivate->ev)))
            CORBA_free(list);
        g_warning(_("Warning: unable to set speech parameters\n"));
        return false;
    }
    for(unsigned i = 0; i < list->_length; i++) {
        GNOME_Speech_Parameter *p = &(list->_buffer[i]);
        if(!strcmp(p->name, "rate")) {
            GNOME_Speech_Speaker_setParameterValue(pDasherActionSpeechPrivate->speaker, p->name, 200.0, &(pDasherActionSpeechPrivate->ev));
        }
    }
    CORBA_free(list);

    return true;
}
开发者ID:rgee,项目名称:HFOSS-Dasher,代码行数:60,代码来源:dasher_action_speech.cpp


示例16: impl_exists

static gboolean
impl_exists (BonoboUIComponent *component,
	     const char        *path,
	     CORBA_Environment *opt_ev)
{
	gboolean ret;
	Bonobo_UIContainer container;
	CORBA_Environment *ev, tmp_ev;

	container = component->priv->container;
	g_return_val_if_fail (container != CORBA_OBJECT_NIL, FALSE);

	if (opt_ev)
		ev = opt_ev;
	else {
		CORBA_exception_init (&tmp_ev);
		ev = &tmp_ev;
	}

	ret = Bonobo_UIContainer_exists (container, path, ev);

	if (BONOBO_EX (ev)) {
		ret = FALSE;
		if (!opt_ev)
			g_warning ("Serious exception on path_exists '$%s'",
				   bonobo_exception_get_text (ev));
	}

	if (!opt_ev)
		CORBA_exception_free (&tmp_ev);

	return ret;
}
开发者ID:Distrotech,项目名称:libbonoboui,代码行数:33,代码来源:bonobo-ui-component.c


示例17: main

int
main (int argc, char *argv[])
{
	CORBA_Object servant = CORBA_OBJECT_NIL;
	
	CORBA_char filename[] = "/tmp/test-ldata.ior";

	CORBA_Environment  ev[1];
	CORBA_exception_init(ev);
	
	server_init (&argc, argv, &global_orb, &root_poa, ev);
	etk_abort_if_exception(ev, "failed ORB init");

	servant = server_activate_service (global_orb, root_poa, ev);
	etk_abort_if_exception(ev, "failed activating service");

	g_print ("Writing service reference to: %s\n\n", filename);

	etk_export_object_to_file (global_orb, 
				   servant, 
				   filename, 
				   ev);
	etk_abort_if_exception(ev, "failed exporting IOR");
	
	server_run (global_orb, ev);
	etk_abort_if_exception(ev, "failed entering main loop");

	server_cleanup (global_orb, root_poa, servant, ev);
	etk_abort_if_exception(ev, "failed cleanup");

	exit (0);
}
开发者ID:robtaylor,项目名称:ipc-benchmarking,代码行数:32,代码来源:ldata-server.c


示例18: bonobo_ui_component_object_get

/**
 * bonobo_ui_component_object_get:
 * @component: the component
 * @path: the path to set
 * @ev: the (optional) CORBA exception environment
 * 
 * This returns the @control CORBA object registered with the
 * #BonoboUIContainer associated with this @component at
 * the specified @path.
 *
 * Returns: the associated remote CORBA object.
 **/
Bonobo_Unknown
bonobo_ui_component_object_get (BonoboUIComponent  *component,
				const char         *path,
				CORBA_Environment  *ev)
{
	CORBA_Environment *real_ev, tmp_ev;
	Bonobo_Unknown     ret;
	Bonobo_UIContainer container;

	g_return_val_if_fail (BONOBO_IS_UI_COMPONENT (component),
			      CORBA_OBJECT_NIL);
	container = component->priv->container;
	g_return_val_if_fail (container != CORBA_OBJECT_NIL,
			      CORBA_OBJECT_NIL);

	if (ev)
		real_ev = ev;
	else {
		CORBA_exception_init (&tmp_ev);
		real_ev = &tmp_ev;
	}

	ret = Bonobo_UIContainer_getObject (container, path, real_ev);

	if (!ev && BONOBO_EX (real_ev))
		g_warning ("Serious exception getting object '%s' '%s'",
			   path, bonobo_exception_get_text (real_ev));

	if (!ev)
		CORBA_exception_free (&tmp_ev);

	return ret;
}
开发者ID:Distrotech,项目名称:libbonoboui,代码行数:45,代码来源:bonobo-ui-component.c


示例19: bonobo_zoomable_frame_bind_to_zoomable

/**
 * bonobo_zoomable_frame_bind_to_zoomable:
 * @zoomable_frame: A BonoboZoomableFrame object.
 * @zoomable: The CORBA object for the BonoboZoomable embedded
 * in this BonoboZoomableFrame.
 *
 * Associates @zoomable with this @zoomable_frame.
 */
void
bonobo_zoomable_frame_bind_to_zoomable (BonoboZoomableFrame *zoomable_frame,
					Bonobo_Zoomable      zoomable,
					CORBA_Environment   *opt_ev)
{
	CORBA_Environment *ev, temp_ev;

	g_return_if_fail (zoomable != CORBA_OBJECT_NIL);
	g_return_if_fail (BONOBO_IS_ZOOMABLE_FRAME (zoomable_frame));

	if (zoomable_frame->priv->zoomable != CORBA_OBJECT_NIL)
		CORBA_Object_release (zoomable_frame->priv->zoomable, NULL);

	zoomable_frame->priv->zoomable = CORBA_Object_duplicate (zoomable, NULL);

	if (!opt_ev) {
		CORBA_exception_init (&temp_ev);
		ev = &temp_ev;
	} else
		ev = opt_ev;

	Bonobo_Zoomable_setFrame (zoomable, BONOBO_OBJREF (zoomable_frame), ev);

	if (BONOBO_EX (ev))
		bonobo_object_check_env (BONOBO_OBJECT (zoomable_frame), zoomable, ev);

	if (!opt_ev)
		CORBA_exception_free (&temp_ev);
}
开发者ID:Distrotech,项目名称:libbonoboui,代码行数:37,代码来源:bonobo-zoomable-frame.c


示例20: matecomponent_event_source_client_remove_listener

void
matecomponent_event_source_client_remove_listener (MateComponent_Unknown     object,
					    MateComponent_Listener    listener,
					    CORBA_Environment *opt_ev)
{
	MateComponent_Unknown     es;
	CORBA_Environment *ev, temp_ev;

	g_return_if_fail (object != CORBA_OBJECT_NIL);
       
	if (!opt_ev) {
		CORBA_exception_init (&temp_ev);
		ev = &temp_ev;
	} else
		ev = opt_ev;

	es = MateComponent_Unknown_queryInterface (object, 
	        "IDL:MateComponent/EventSource:1.0", ev);

	if (!MATECOMPONENT_EX (ev) && es) {

		MateComponent_EventSource_removeListener (es, listener, ev);

		MateComponent_Unknown_unref (es, ev);
	}

	if (!opt_ev) {
		if (MATECOMPONENT_EX (ev)) {
			char *text = matecomponent_exception_get_text (ev);
			g_warning ("remove_listener failed '%s'", text);
			g_free (text);
		}
		CORBA_exception_free (ev);
	}
}
开发者ID:TheCoffeMaker,项目名称:Mate-Desktop-Environment,代码行数:35,代码来源:matecomponent-event-source.c



注:本文中的CORBA_exception_init函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ CORBA_free函数代码示例发布时间:2022-05-30
下一篇:
C++ COPY_TO_USER_STRING函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap