//
//   COMPONENT_NAME: somd
//
//   ORIGINS: 27
//
//
//    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,1996 
//   All Rights Reserved
//   Licensed Materials - Property of IBM
//   US Government Users Restricted Rights - Use, duplication or
//   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
//
//#  @(#) 2.16 src/somd/nvlist.idl, somd, som3.0 9/26/96 14:02:01 [12/22/96 21:11:47]




#ifndef nvlist_idl
#define nvlist_idl

#include <somobj.idl>
#include <somdtype.idl>

interface NVList : SOMObject
{
//  This class implements the NVList object.
//  An NVList contains an ordered set of NamedValue structures.  
//
//  NVLists are used to pass argument lists for an operation when creating 
//  a request for the Dynamic Invocation Interface (DII).


  ORBStatus add_item(in Identifier item_name, in TypeCode item_type, 
		     in void *value, in long value_len, in Flags item_flags);

  // Add an element to an NVList.


  ORBStatus free();

  // Free the NVList and any associated memory.

  ORBStatus free_memory();

  // Free dynamically allocated memory associated with the list.

  ORBStatus get_count(out long count);

  // Get the number of elements in the NVList.
  

  //#
  //# These are the accessor functions which allow indexing
  //# into the NVList:
  //#

  ORBStatus set_item(in long item_number, 
	       in Identifier item_name, in TypeCode item_type, 
               in void *value, in long value_len, in Flags item_flags);

  // Set the contents of an element in an NVList.  
  // Items are numbered beginning from 0.

  ORBStatus get_item(in long item_number, 
	       out Identifier item_name, out TypeCode item_type, 
               out void *value, out long value_len, out Flags item_flags);

  // Get the contents of an element in an NVList.  
  // Items are numbered beginning from 0.
  // OWNERSHIP of the "out" parameters is NOT transferred to the caller;
  // Hence, the caller should not free them.

#ifdef __SOMIDL__

  implementation 
  {
    releaseorder: add_item, remove_item, free, free_memory, get_count, 
		  set_item, get_item, get_item_by_name;

    //# Class Modifiers
    callstyle = idl;
    functionprefix = "NVList__";
    dllname = "somd.dll";
    majorversion = 2;
    minorversion = 2;
  
    //# Method Modifiers
    somDefaultInit: override, init;
    somDestruct: override;

  };

#endif /* __SOMIDL__ */

};

#endif  /* nvlist_idl */
