//Naming Service Specification, v1.3 - OMG IDL Summary File //Object Management Group, Inc. //Copyright © 1999, BEA Systems //Copyright © 1999, DSTC //Copyright © 1999, Iona Technologies Ltd. //Copyright © 1999, Inprise //The companies listed above have granted to the Object Management Group, Inc. //(OMG) a nonexclusive, royalty-free, paid up, worldwide license to copy and //distribute this document and to modify this document and distribute copies of //the modified version. Each of the copyright holders listed above has agreed //that no person shall be deemed to have infringed the copyright in the included //material of any such copyright holder by reason of having used the //specification set forth herein or having conformed any computer software to //the specification. // //This file contains OMG IDL from the Naming Service Specification, v1.2. //OMG regularly publishes a summary file that contains all the "code" parts of //an OMG formal document. Every formal document line that is IDL, PIDL, or //language code is included in the summary file. The reason for such a listing //is to give readers an electronic version of the "code" so that they can //extract pieces of it. Readers might want to test an example, include it in //their own code, or use it for documentation purposes. Having the code lines //available electronically means there is less likelihood of a transcription //error. // // File: CosNaming.idl #ifndef _COSNAMING_IDL_ #define _COSNAMING_IDL_ #pragma prefix "omg.org" module CosNaming { typedef string Istring; struct NameComponent { Istring id; Istring kind; }; typedef sequence Name; enum BindingType { nobject, ncontext }; struct Binding { Name binding_name; BindingType binding_type; }; // Note: In struct Binding, binding_name is incorrectly defined // as a Name instead of a NameComponent. This definition is // unchanged for compatibility reasons. typedef sequence BindingList; interface BindingIterator; interface NamingContext { enum NotFoundReason { missing_node, not_context, not_object }; exception NotFound { NotFoundReason why; Name rest_of_name; }; exception CannotProceed { NamingContext cxt; Name rest_of_name; }; exception InvalidName{}; exception AlreadyBound {}; exception NotEmpty{}; void bind(in Name n, in Object obj) raises( NotFound, CannotProceed, InvalidName, AlreadyBound ); void rebind(in Name n, in Object obj) raises(NotFound, CannotProceed, InvalidName); void bind_context(in Name n, in NamingContext nc) raises(NotFound, CannotProceed, InvalidName, AlreadyBound); void rebind_context(in Name n, in NamingContext nc) raises(NotFound, CannotProceed, InvalidName); Object resolve (in Name n) raises(NotFound, CannotProceed, InvalidName); void unbind(in Name n) raises(NotFound, CannotProceed, InvalidName); NamingContext new_context(); NamingContext bind_new_context(in Name n) raises( NotFound, AlreadyBound, CannotProceed, InvalidName ); void destroy() raises(NotEmpty); void list( in unsigned long how_many, out BindingList bl, out BindingIterator bi ); }; interface BindingIterator { boolean next_one(out Binding b); boolean next_n(in unsigned long how_many, out BindingList bl); void destroy(); }; interface NamingContextExt: NamingContext { typedef string StringName; typedef string Address; typedef string URLString; StringName to_string(in Name n) raises(InvalidName); Name to_name(in StringName sn) raises(InvalidName); exception InvalidAddress {}; URLString to_url(in Address addr, in StringName sn) raises(InvalidAddress, InvalidName); Object resolve_str(in StringName sn) raises( NotFound, CannotProceed, InvalidName ); }; }; #endif // _COSNAMING_IDL_