Module: scepter-tests
Author: Jason Trenouth
Copyright:    Original Code is Copyright (c) 1995-2004 Functional Objects, Inc.
              All rights reserved.
License:      See License.txt in this distribution for details.
Warranty:     Distributed WITHOUT WARRANTY OF ANY KIND

define test corba-services-idl-Stream ()
  check("", test-idl-file, *corba-services-files*, "Stream");
end test;

add-idl-file!(
  *corba-services-files*,
  "Stream",
"// CosStream Module, 8-15 CORBAservices, \n"
"// Externalization Service V1.0, 3/94\n"
"\n"
"#ifndef COSSTREAM\n"
"#define COSSTREAM\n"
"#include <LifeCycle.idl>\n"
"#include <ObjectIdentity.idl>\n"
"\n"
"// #include <CompoundExternalization.idl>\n"
"//\n"
"// GROSS HACK: Stream and CompoundExternalization try to include each other\n"
"// so put forward defined stubs in instead. \n"
"//\n"
"module CosCompoundExternalization {\n"
"  interface Node;\n"
"};\n"
"\n"
"module CosStream {\n"
"\t\texception ObjectCreationError{};\n"
"\t\texception StreamDataFormatError{};\n"
"\t\tinterface StreamIO;\n"
"\n"
"\t\tinterface Streamable: \n"
"\t\t\t\tCosObjectIdentity::IdentifiableObject {\n"
"\t\t\treadonly attribute CosLifeCycle::Key external_form_id;\n"
"\t\t\tvoid externalize_to_stream(\n"
"\t\t\t\t\tin StreamIO\t\ttargetStreamIO);\n"
"\t\t\tvoid internalize_from_stream(\n"
"\t\t\t\t\tin StreamIO\t\tsourceStreamIO,\n"
"\t\t\t\t\tin CosLifeCycle::FactoryFinder there)\n"
"\t\t\t\traises(\t\tCosLifeCycle::NoFactory,\n"
"\t\t\t\t\tObjectCreationError,\n"
"\t\t\t\t\tStreamDataFormatError );\n"
"\t\t};\n"
"\n"
"\t\tinterface StreamableFactory {\n"
"\t\t\tStreamable create_uninitialized();\n"
"\t\t};\n"
"\n"
"\n"
"\t\tinterface StreamIO {\n"
" \t\t\tvoid write_string(in string aString);\n"
" \t\t\tvoid write_char(in char aChar);\n"
" \t\t\tvoid write_octet(in octet anOctet);\n"
" \t\t\tvoid write_unsigned_long(\n"
"\t\t\t\t\tin unsigned long anUnsignedLong);\n"
" \t\t\tvoid write_unsigned_short(\n"
"\t\t\t\t\tin unsigned short anUnsignedShort);\n"
" \t\t\tvoid write_long(in long aLong);\n"
" \t\t\tvoid write_short(in short aShort);\n"
" \t\t\tvoid write_float(in float aFloat);\n"
" \t\t\tvoid write_double(in double aDouble);\n"
" \t\t\tvoid write_boolean(in boolean aBoolean);\n"
" \t\t\tvoid write_object(in Streamable aStreamable);\n"
" \t\t\tvoid write_graph(in CosCompoundExternalization::Node aNode);\n"
" \t\t\tstring read_string() \n"
"\t\t\t\traises(StreamDataFormatError);\n"
" \t\t\tchar read_char() \n"
"\t\t\t\traises(StreamDataFormatError );\n"
" \t\t\toctet read_octet()\n"
"\t\t\t\traises(StreamDataFormatError );\n"
" \t\t\tunsigned long read_unsigned_long() \n"
"\t\t\t\t\traises(StreamDataFormatError );\n"
" \t\t\tunsigned short read_unsigned_short()\n"
"\t\t\t\traises(\t\tStreamDataFormatError );\n"
" \t\t\tlong read_long() \n"
"\t\t\t\traises(StreamDataFormatError );\n"
" \t\t\tshort read_short()\n"
"\t\t\t\traises(StreamDataFormatError );\n"
" \t\t\tfloat read_float()\n"
"\t\t\t\traises(StreamDataFormatError );\n"
" \t\t\tdouble read_double()\n"
"\t\t\t\traises(StreamDataFormatError );\n"
" \t\t\tboolean read_boolean()\n"
"\t\t\t\traises(StreamDataFormatError );\n"
" \t\t\tStreamable read_object(\n"
"\t\t\t\t\tin CosLifeCycle::FactoryFinder there,\n"
"\t\t\t\t\tin Streamable aStreamable)\n"
"\t\t\t\traises(StreamDataFormatError );\n"
" \t\t\tvoid read_graph(\n"
"\t\t\t\t\tin CosCompoundExternalization::Node starting_node,\n"
"\t\t\t\t\tin CosLifeCycle::FactoryFinder there)\n"
"\t\t\t\traises(StreamDataFormatError );\n"
"\t\t};\n"
"\t};\n"
"#endif\n"
"\n");
