home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / som / include / cntxt.idl < prev    next >
Text File  |  1999-02-22  |  5KB  |  161 lines

  1. //
  2. //   COMPONENT_NAME: somd
  3. //
  4. //   ORIGINS: 27
  5. //
  6. //
  7. //   10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994
  8. //   All Rights Reserved
  9. //   Licensed Materials - Property of IBM
  10. //   US Government Users Restricted Rights - Use, duplication or
  11. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  12. //
  13. //#  @(#) 2.9 src/somd/cntxt.idl, somd, som2.1 11/2/94 13:59:57 [7/30/96 14:45:23]
  14.  
  15.  
  16.  
  17. //  IDL specification for CORBA Context Object.
  18.  
  19.  
  20.  
  21. #ifndef context_idl
  22. #define context_idl
  23.  
  24. #include <somobj.idl>
  25. #include <somdtype.idl>
  26.  
  27. interface NVList;
  28.  
  29.  
  30. interface Context : SOMObject
  31. {
  32.   ORBStatus set_one_value(in Identifier prop_name, in string value);
  33.  
  34.   //  This method sets or adds a single context object property. If prop_name
  35.   //  does not exist in the property list, it is added. If prop_name
  36.   //  does exist, its value is changed. 
  37.   //
  38.  
  39.   ORBStatus set_values(in NVList values);
  40.  
  41.   //  This method sets or changes one or more property values in the context
  42.   //  object. If a prop_name specified in the NVList does not exist in the
  43.   //  Context object property list, it is added. If a prop_name specified in
  44.   //  the NVList does exist in the Context object property list, its value
  45.   //  is changed.
  46.   //
  47.  
  48.   ORBStatus get_values(in  Identifier start_scope, 
  49.                in  Flags op_flags, 
  50.                        in  Identifier prop_name, 
  51.                        out NVList values);
  52.  
  53.   //  This method retrieves the specified context property value(s) If
  54.   //  prop_name has a trailing wildcard ("*"), then all matching properties
  55.   //  and their values are returned. The returned NVList is the responsibility
  56.   //  of the caller,
  57.   //
  58.   //  If no matching properties are found, and error is returned the property
  59.   //  list contains no values.
  60.   // 
  61.   //  Scope indicates the context object level at which to initiate the search
  62.   //  for the specified properties (e.g. "_USER", "_SYSTEM"). If the property
  63.   //  is not found at the indicated level, the search continues up the context
  64.   //  object tree until a match is found or all context objects in the chain
  65.   //  have been searched.
  66.   //
  67.   //  If scope name is ommitted, the search begins with the specified context
  68.   //  object. If the specified scope name is not found, an exception is 
  69.   //  returned.
  70.   //
  71.   //  The following operation flags may be specified:
  72.   // 
  73.   //  CTX_RESTRICT_SCOPE  Searching is limited to the specified search scope or
  74.   //                      context object.
  75.   //
  76.  
  77.   ORBStatus delete_values(in Identifier prop_name);
  78.  
  79.   //  This method deletes the specified property value(s) from the context
  80.   //  object.  If prop_name has a trailing wildcard character ("*"), then 
  81.   //  all property names which match will be deleted.
  82.   //
  83.   //  Search scope is always limited to the specified context object.
  84.   //
  85.   //  If no matching property is found, an exception is returned.
  86.   //
  87.  
  88.   ORBStatus create_child(in  Identifier ctx_name, 
  89.                          out Context child_ctx);
  90.  
  91.   // 
  92.   //  This method creates a child context object.
  93.   //  
  94.   //  The returned context object is chained to its parent context. That is,
  95.   //  searches on the child context object will look in the parent context
  96.   //  (and so on, up the context tree), if necessary, for matching property 
  97.   //  names.
  98.   //
  99.  
  100.   ORBStatus destroy(in Flags flags);
  101.  
  102.   //  This operation deletes the indicated context object.
  103.   //  The following flags may be specified:
  104.   //  
  105.   //  CTX_DELETE_DESCENDENTS    Deletes the indicated context object and all
  106.   //                            of its descendent context objects as well.
  107.   //
  108.   //  An exception is returned if there are one or more child context objects
  109.   //  and the CTX_DELETE_DESCENDENTS flag was not set.
  110.   //
  111.  
  112.  
  113. #ifdef __SOMIDL__
  114.  
  115.   implementation 
  116.   {
  117.     releaseorder: set_one_value, set_values, get_values, 
  118.           delete_values, create_child, destroy,
  119.           _get_context_name, _set_context_name,
  120.           _get_context_parent, _set_context_parent,
  121.           _get_properties, _set_properties;
  122.  
  123.     //# Class Modifiers
  124.     callstyle=idl;
  125.     dllname = "somd.dll";
  126.     majorversion = 2;
  127.     minorversion = 1;
  128.   
  129.     //# Method Modifiers
  130.     somDefaultInit: override;
  131.     somDestruct: override;
  132.   
  133.     //# Passthrus
  134.     #define COMMON_H_PASSTHRU \
  135.       "" \
  136.       "/*" \
  137.       " * Context flags" \
  138.       " */" \
  139.       "#define CTX_DELETE_DESCENDENTS      0x00000200" \
  140.       "#define CTX_RESTRICT_SCOPE          0x00000400" \
  141.       ""
  142.     passthru C_xh_after = COMMON_H_PASSTHRU;
  143.     passthru C_h_after  = COMMON_H_PASSTHRU
  144.       ""
  145.       "/* alias for CORBA compatibility */"
  146.       "#ifndef Context_delete"
  147.       "#define Context_delete Context_destroy"
  148.       "#endif"
  149.       ""
  150.       ; /* end C_h_passthru */
  151.   };
  152.  
  153. #endif /* __SOMIDL__ */
  154.  
  155. };
  156.  
  157. #endif  /* context_idl */
  158.  
  159.  
  160.  
  161.