home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / som30tk.zip / som30os2.zip / include / nvlist.idl < prev    next >
Text File  |  1996-12-24  |  3KB  |  98 lines

  1. //
  2. //   COMPONENT_NAME: somd
  3. //
  4. //   ORIGINS: 27
  5. //
  6. //
  7. //    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,1996 
  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.16 src/somd/nvlist.idl, somd, som3.0 9/26/96 14:02:01 [12/24/96 07:39:29]
  14.  
  15.  
  16.  
  17.  
  18. #ifndef nvlist_idl
  19. #define nvlist_idl
  20.  
  21. #include <somobj.idl>
  22. #include <somdtype.idl>
  23.  
  24. interface NVList : SOMObject
  25. {
  26. //  This class implements the NVList object.
  27. //  An NVList contains an ordered set of NamedValue structures.  
  28. //
  29. //  NVLists are used to pass argument lists for an operation when creating 
  30. //  a request for the Dynamic Invocation Interface (DII).
  31.  
  32.  
  33.   ORBStatus add_item(in Identifier item_name, in TypeCode item_type, 
  34.              in void *value, in long value_len, in Flags item_flags);
  35.  
  36.   // Add an element to an NVList.
  37.  
  38.  
  39.   ORBStatus free();
  40.  
  41.   // Free the NVList and any associated memory.
  42.  
  43.   ORBStatus free_memory();
  44.  
  45.   // Free dynamically allocated memory associated with the list.
  46.  
  47.   ORBStatus get_count(out long count);
  48.  
  49.   // Get the number of elements in the NVList.
  50.   
  51.  
  52.   //#
  53.   //# These are the accessor functions which allow indexing
  54.   //# into the NVList:
  55.   //#
  56.  
  57.   ORBStatus set_item(in long item_number, 
  58.            in Identifier item_name, in TypeCode item_type, 
  59.                in void *value, in long value_len, in Flags item_flags);
  60.  
  61.   // Set the contents of an element in an NVList.  
  62.   // Items are numbered beginning from 0.
  63.  
  64.   ORBStatus get_item(in long item_number, 
  65.            out Identifier item_name, out TypeCode item_type, 
  66.                out void *value, out long value_len, out Flags item_flags);
  67.  
  68.   // Get the contents of an element in an NVList.  
  69.   // Items are numbered beginning from 0.
  70.   // OWNERSHIP of the "out" parameters is NOT transferred to the caller;
  71.   // Hence, the caller should not free them.
  72.  
  73. #ifdef __SOMIDL__
  74.  
  75.   implementation 
  76.   {
  77.     releaseorder: add_item, remove_item, free, free_memory, get_count, 
  78.           set_item, get_item, get_item_by_name;
  79.  
  80.     //# Class Modifiers
  81.     callstyle = idl;
  82.     functionprefix = "NVList__";
  83.     dllname = "somd.dll";
  84.     majorversion = 2;
  85.     minorversion = 2;
  86.   
  87.     //# Method Modifiers
  88.     somDefaultInit: override, init;
  89.     somDestruct: override;
  90.  
  91.   };
  92.  
  93. #endif /* __SOMIDL__ */
  94.  
  95. };
  96.  
  97. #endif  /* nvlist_idl */
  98.