home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / cntxt.idl < prev    next >
Encoding:
Text File  |  1996-02-21  |  4.7 KB  |  152 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.  
  14. //  IDL specification for CORBA Context Object.
  15.  
  16.  
  17. #ifndef context_idl
  18. #define context_idl
  19.  
  20. #include <somobj.idl>
  21. #include <somdtype.idl>
  22.  
  23. interface NVList;
  24.  
  25. interface Context : SOMObject
  26. {
  27.   ORBStatus set_one_value(in Identifier prop_name, in string value);
  28.  
  29.   //  This method sets or adds a single context object property. If prop_name
  30.   //  does not exist in the property list, it is added. If prop_name
  31.   //  does exist, its value is changed. 
  32.   //
  33.  
  34.   ORBStatus set_values(in NVList values);
  35.  
  36.   //  This method sets or changes one or more property values in the context
  37.   //  object. If a prop_name specified in the NVList does not exist in the
  38.   //  Context object property list, it is added. If a prop_name specified in
  39.   //  the NVList does exist in the Context object property list, its value
  40.   //  is changed.
  41.   //
  42.  
  43.   ORBStatus get_values(in  Identifier start_scope, 
  44.                in  Flags op_flags, 
  45.                        in  Identifier prop_name, 
  46.                        out NVList values);
  47.  
  48.   //  This method retrieves the specified context property value(s) If
  49.   //  prop_name has a trailing wildcard ("*"), then all matching properties
  50.   //  and their values are returned. The returned NVList is the responsibility
  51.   //  of the caller,
  52.   //
  53.   //  If no matching properties are found, and error is returned the property
  54.   //  list contains no values.
  55.   // 
  56.   //  Scope indicates the context object level at which to initiate the search
  57.   //  for the specified properties (e.g. "_USER", "_SYSTEM"). If the property
  58.   //  is not found at the indicated level, the search continues up the context
  59.   //  object tree until a match is found or all context objects in the chain
  60.   //  have been searched.
  61.   //
  62.   //  If scope name is ommitted, the search begins with the specified context
  63.   //  object. If the specified scope name is not found, an exception is 
  64.   //  returned.
  65.   //
  66.   //  The following operation flags may be specified:
  67.   // 
  68.   //  CTX_RESTRICT_SCOPE  Searching is limited to the specified search scope or
  69.   //                      context object.
  70.   //
  71.  
  72.   ORBStatus delete_values(in Identifier prop_name);
  73.  
  74.   //  This method deletes the specified property value(s) from the context
  75.   //  object.  If prop_name has a trailing wildcard character ("*"), then 
  76.   //  all property names which match will be deleted.
  77.   //
  78.   //  Search scope is always limited to the specified context object.
  79.   //
  80.   //  If no matching property is found, an exception is returned.
  81.   //
  82.  
  83.   ORBStatus create_child(in  Identifier ctx_name, 
  84.                          out Context child_ctx);
  85.  
  86.   // 
  87.   //  This method creates a child context object.
  88.   //  
  89.   //  The returned context object is chained to its parent context. That is,
  90.   //  searches on the child context object will look in the parent context
  91.   //  (and so on, up the context tree), if necessary, for matching property 
  92.   //  names.
  93.   //
  94.  
  95.   ORBStatus destroy(in Flags flags);
  96.  
  97.   //  This operation deletes the indicated context object.
  98.   //  The following flags may be specified:
  99.   //  
  100.   //  CTX_DELETE_DESCENDENTS    Deletes the indicated context object and all
  101.   //                            of its descendent context objects as well.
  102.   //
  103.   //  An exception is returned if there are one or more child context objects
  104.   //  and the CTX_DELETE_DESCENDENTS flag was not set.
  105.   //
  106.  
  107.  
  108. #ifdef __SOMIDL__
  109.  
  110.   implementation 
  111.   {
  112.     releaseorder: set_one_value, set_values, get_values, 
  113.           delete_values, create_child, destroy,
  114.           _get_context_name, _set_context_name,
  115.           _get_context_parent, _set_context_parent,
  116.           _get_properties, _set_properties;
  117.  
  118.     callstyle=idl;
  119.     dllname = "somd.dll";
  120.     majorversion = 2;
  121.     minorversion = 1;
  122.  
  123.     somDefaultInit: override;
  124.     somDestruct: override;
  125.  
  126.     #define COMMON_H_PASSTHRU \
  127.       "" \
  128.       "/*" \
  129.       " * Context flags" \
  130.       " */" \
  131.       "#define CTX_DELETE_DESCENDENTS      0x00000200" \
  132.       "#define CTX_RESTRICT_SCOPE          0x00000400" \
  133.       ""
  134.     passthru C_xh_after = COMMON_H_PASSTHRU;
  135.     passthru C_hh_after = COMMON_H_PASSTHRU;
  136.     passthru C_h_after  = COMMON_H_PASSTHRU
  137.       ""
  138.       "/* alias for CORBA compatibility */"
  139.       "#ifndef Context_delete"
  140.       "#define Context_delete Context_destroy"
  141.       "#endif"
  142.       ""
  143.       ; /* end C_h_passthru */
  144.   };
  145.  
  146. #endif /* __SOMIDL__ */
  147.  
  148. };
  149.  
  150. #endif  /* context_idl */
  151.  
  152.