这篇教程C++ CORBA_exception_init函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CORBA_exception_init函数的典型用法代码示例。如果您正苦于以下问题:C++ CORBA_exception_init函数的具体用法?C++ CORBA_exception_init怎么用?C++ CORBA_exception_init使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CORBA_exception_init函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 gbooleanlaunch_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,
示例2: set_data_and_propsstatic voidset_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,
示例3: mainint 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,
示例4: matecomponent_foreign_object_newMateComponentObject *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,
示例5: MateCORBA_imodule_create_alias_typecodeCORBA_TypeCodeMateCORBA_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,
示例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,
示例7: impl_xml_rmstatic voidimpl_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,
示例8: bonobo_event_source_client_remove_listenervoidbonobo_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,
示例9: matecomponent_zoomable_frame_get_preferred_zoom_level_namesGList *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,
示例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. */voidmatecomponent_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,
示例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. */voidmatecomponent_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,
示例12: get_circleMateCanvasItem* 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,
示例13: get_Wise2Corba_SingletonWise2Corba_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,
示例14: impl_set_propstatic voidimpl_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,
示例15: dasher_action_speech_activatestatic gbooleandasher_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,
示例16: impl_existsstatic gbooleanimpl_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,
示例17: mainintmain (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,
示例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_Unknownbonobo_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,
示例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. */voidbonobo_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,
示例20: matecomponent_event_source_client_remove_listenervoidmatecomponent_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,
示例21: bonobo_zoomable_frame_get_preferred_zoom_level_namesGList *bonobo_zoomable_frame_get_preferred_zoom_level_names (BonoboZoomableFrame *zoomable_frame){ CORBA_Environment ev; Bonobo_ZoomLevelNameList *zoom_level_names; GList *list = NULL; int i; g_return_val_if_fail (BONOBO_IS_ZOOMABLE_FRAME (zoomable_frame), NULL); CORBA_exception_init (&ev); zoom_level_names = Bonobo_Zoomable__get_preferredLevelNames ( zoomable_frame->priv->zoomable, &ev); if (BONOBO_EX (&ev)) { bonobo_object_check_env (BONOBO_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:Distrotech,项目名称:libbonoboui,代码行数:33,
示例22: test_activate_from_id/* returns 1 in case of success. 0 otherwise. -1 if answer timeouted.... */static inttest_activate_from_id (char *aid){ CORBA_Environment ev; callback_data_t data; GMainLoop *loop = g_main_loop_new (NULL, FALSE); guint timeout_id; CORBA_exception_init (&ev); data.callback_called = FALSE; data.succeeded = FALSE; data.loop = loop; bonobo_activation_activate_from_id_async (aid, 0, test_callback, &data, &ev); timeout_id = g_timeout_add (DEBUG_TIMEOUT, (GSourceFunc) g_main_loop_quit, loop); g_main_loop_run (loop); if (data.callback_called == FALSE) g_source_remove (timeout_id); g_main_loop_unref (loop); if (data.callback_called == FALSE) { return -1; } if (data.succeeded == TRUE) { return 1; } else { return 0; }}
开发者ID:Distrotech,项目名称:libbonobo,代码行数:32,
示例23: empty_activation_cbstatic voidempty_activation_cb (CORBA_Object obj, const char *error_reason, gpointer user_data){ CORBA_Environment ev; gboolean ret = FALSE; char *repo_id = user_data; CORBA_exception_init (&ev); if (error_reason) g_warning ("Async activation error activating '%s' : '%s'", repo_id, error_reason); else if (test_object (obj, &ev, "by async query")) ret = test_empty (obj, &ev, "by async query"); if (ret) { passed++; fprintf (stderr, "PASSED %d of %d: async activation/n", passed + failed, TOTAL_TEST_SCORE); } else { failed++; fprintf (stderr, "FAILED %d of %d: async activation/n", passed + failed, TOTAL_TEST_SCORE); } CORBA_exception_free (&ev); async_done++;}
开发者ID:TheCoffeMaker,项目名称:Mate-Desktop-Environment,代码行数:29,
示例24: capture_image_idlestatic gbooleancapture_image_idle (gpointer user_data){ CameraFilePath path; IdleData *d = user_data; CORBA_Environment ev; CORBA_any any; gchar *p = NULL; CORBA_exception_init (&ev); memset (&path, 0, sizeof (CameraFilePath)); CR (gp_camera_capture (d->gc->camera, GP_CAPTURE_IMAGE, &path, NULL), &ev); if (BONOBO_EX (&ev)) { GNOME_Camera_ErrorCode e = GNOME_Camera_ERROR; any._type = TC_GNOME_Camera_ErrorCode; any._value = &e; } else { p = g_build_path ("/", path.folder, path.name); any._type = TC_CORBA_string; any._value = &p; } g_message ("Notifying..."); Bonobo_Listener_event (d->listener, "result", &any, &ev); g_message ("Notified."); if (p) g_free (p); CORBA_exception_free (&ev); return (FALSE);}
开发者ID:rajbot,项目名称:gphoto,代码行数:34,
示例25: impl_freezestatic voidimpl_freeze (BonoboUIComponent *component, CORBA_Environment *ev){ if (component->priv->frozenness == 0) { 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; } Bonobo_UIContainer_freeze (container, real_ev); if (BONOBO_EX (real_ev) && !ev) g_warning ("Serious exception on UI freeze '$%s'", bonobo_exception_get_text (real_ev)); if (!ev) CORBA_exception_free (&tmp_ev); } component->priv->frozenness++;}
开发者ID:Distrotech,项目名称:libbonoboui,代码行数:30,
示例26: guignome_corba_activate_server/** * guignome_corba_activate_server: * @void: * * Activates the POA manager and thus makes the services available to the * outside world. **/voidguignome_corba_activate_server (void){ CORBA_Environment ev; PortableServer_POAManager poa_manager; g_message("In guignome_corba_activate_server (1)/n"); /* Do nothing if the server is already running */ if (guignome_corba_have_server) return; g_message("In guignome_corba_activate_server (2)/n"); CORBA_exception_init (&ev); poa_manager = PortableServer_POA__get_the_POAManager (poa, &ev); if (ev._major != CORBA_NO_EXCEPTION) goto out; g_message("In guignome_corba_activate_server (3)/n"); PortableServer_POAManager_activate (poa_manager, &ev); if (ev._major != CORBA_NO_EXCEPTION) goto out; g_message("In guignome_corba_activate_server (4)/n"); out: { CORBA_char *str=CORBA_exception_id(&ev);; g_message("In guignome_corba_activate_server (4a) exception=%d - %s/n", ev._major,str==NULL? "<NULL>" : str); CORBA_exception_free (&ev); g_message("In guignome_corba_activate_server (5)/n"); }}
开发者ID:OS2World,项目名称:APP-EDITOR-elvis,代码行数:40,
示例27: impl_thawstatic voidimpl_thaw (BonoboUIComponent *component, CORBA_Environment *ev){ component->priv->frozenness--; if (component->priv->frozenness == 0) { 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; } Bonobo_UIContainer_thaw (container, real_ev); if (BONOBO_EX (real_ev) && !ev) g_warning ("Serious exception on UI thaw '$%s'", bonobo_exception_get_text (real_ev)); if (!ev) CORBA_exception_free (&tmp_ev); } else if (component->priv->frozenness < 0) g_warning ("Freeze/thaw mismatch on '%s'", component->priv->name ? component->priv->name : "<Null>");}
开发者ID:Distrotech,项目名称:libbonoboui,代码行数:33,
示例28: control_activate_cbstatic voidcontrol_activate_cb (BonoboControl *control, gboolean activate, EYank *yank){ BonoboUIComponent *ui_component; ui_component = bonobo_control_get_ui_component (control); if (yank->shell_view_interface == NULL) { Bonobo_ControlFrame control_frame; CORBA_Environment ev; control_frame = bonobo_control_get_control_frame (control); if (control_frame == NULL) { goto out; } CORBA_exception_init (&ev); yank->shell_view_interface = Bonobo_Unknown_queryInterface (control_frame, "IDL:GNOME/Evolution/ShellView:1.0", &ev); if (BONOBO_EX (&ev)) { g_warning ("Error getting ShellView. %s", CORBA_exception_id (&ev)); yank->shell_view_interface = CORBA_OBJECT_NIL; } CORBA_exception_free (&ev); } out: if (activate) control_activate (control, ui_component, yank); else control_deactivate (control, ui_component, yank);}
开发者ID:jeansch,项目名称:yank-component,代码行数:34,
示例29: set_datastatic voidset_data (BonoboWidget *control, const char *string){ Bonobo_PersistStream persist; BonoboObject *bstream; CORBA_Environment ev; persist = (Bonobo_PersistStream) Bonobo_Unknown_queryInterface ( bonobo_widget_get_objref (control), "IDL:Bonobo/PersistStream:1.0", &ev); if (persist == CORBA_OBJECT_NIL) { g_object_ref_sink (G_OBJECT (control)); return ; } bstream = bonobo_stream_mem_create (string, strlen (string), TRUE, FALSE); CORBA_exception_init (&ev); Bonobo_PersistStream_load (persist, BONOBO_OBJREF (bstream), "text/calendar", &ev); bonobo_object_unref (BONOBO_OBJECT (bstream)); Bonobo_Unknown_unref (persist, &ev); CORBA_Object_release (persist, &ev);}
开发者ID:GNOME,项目名称:evolution-jescs,代码行数:26,
注:本文中的CORBA_exception_init函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CORBA_free函数代码示例 C++ COPY_TO_USER_STRING函数代码示例 |