// $Id: valuebox.idl 91816 2010-09-17 08:35:56Z johnnyw $

#include "vb_basic.idl"
#include "vb_struct.idl"
#include "vb_union.idl"

//
// Boxed Strings
//
valuetype VBstring string;
valuetype VBwstring wstring;

//
// Boxed Sequences
//
typedef sequence<long> TDseqlong;
valuetype VBseqlong TDseqlong;

//
// Boxed array ("fixed")
//
typedef long LongArray[3];
valuetype VBlongarray LongArray;

//
// Boxed array ("variable")
//
typedef string StringArray[2];
valuetype VBstringarray StringArray;

interface Test
{
    // Boxed basic types
    VBlong basic_op1(in VBlong  p1, inout VBlong  p2, out VBlong  p3);

    vb_basic::M_VBlong basic_op2(in vb_basic::M_VBlong  p1,
                                 inout vb_basic::M_VBlong  p2,
                                 out vb_basic::M_VBlong  p3);

    long basic_op3 (in long p1, inout long p2, out long p3);

    // Boxed string
    VBstring string_op1(in VBstring p1, inout VBstring p2, out VBstring  p3);

    string string_op2(in string p1, inout string p2, out string p3);

    // Boxed sequence
    VBseqlong seq_op1(in VBseqlong p1, inout VBseqlong p2,
                         out VBseqlong  p3);

    void seq_op2(in TDseqlong p1, inout TDseqlong p2, out TDseqlong p3);

    // Boxed struct
    VBfixed_struct1 struct_op1(in VBfixed_struct1 p1,
                               inout VBfixed_struct1 p2,
                               out VBfixed_struct1  p3);

    void struct_op2(in Fixed_Struct1 p1,
                    inout Fixed_Struct1 p2,
                    out Fixed_Struct1 p3);

    VBvariable_struct1 struct_op3(in VBvariable_struct1 p1,
                                  inout VBvariable_struct1 p2,
                                  out VBvariable_struct1  p3);

    void struct_op4(in Variable_Struct1 p1,
                    inout Variable_Struct1 p2,
                    out Variable_Struct1 p3);

    // Boxed array (fixed)
    VBlongarray array_op1 (in VBlongarray p1, inout VBlongarray p2,
                           out VBlongarray p3);

    void array_op2 (in LongArray p1, inout LongArray p2, out LongArray p3);

    // Boxed array (variable)
    VBstringarray array_op3 (in VBstringarray p1, inout VBstringarray p2,
                           out VBstringarray p3);

    void array_op4 (in StringArray p1, inout StringArray p2,
                    out StringArray p3);

    // Boxed union
    VBfixed_union1 union_op1(in VBfixed_union1 p1,
                               inout VBfixed_union1 p2,
                               out VBfixed_union1  p3);

    void union_op2(in Fixed_Union1 p1,
                    inout Fixed_Union1 p2,
                    out Fixed_Union1 p3);

    VBvariable_union1 union_op3(in VBvariable_union1 p1,
                                  inout VBvariable_union1 p2,
                                  out VBvariable_union1  p3);

    void union_op4(in Variable_Union1 p1,
                    inout Variable_Union1 p2,
                    out Variable_Union1 p3);

    // Shutdown the remote ORB
    oneway void shutdown ();
};
