//
// Copyright (c) 1997 X/Open Company Ltd., A member of The Open Group.
//
// All rights reserved. No part of this source code may be reproduced,
// stored in a retrieval system, or transmitted, in any form or by any
// means, electronic, mechanical, photocopying, recording or otherwise,
// except as stated in the end-user licence agreement, without the prior
// permission of the copyright owners.
//
// Developed for X/Open by ApTest Ireland Limited.
//
// Project: CORVAL2
//


enum Sweetcorn{
  Banana,
  Carrots,
  Lemon,
  BlackCherry,
  Starfruit,
  Rhubarb
};

exception Mangetout{
};

exception Cress{
  unsigned long Plum;
};

exception BambooShoot{
  float Plum;
  double KidneyBean;
  long Zucchini;
  unsigned long ButterBean;
  short Avocado;
  unsigned short GoldenDelicous;
  char Lentil;
  boolean Fig;
  octet CrabApple;
  string RedOnion;
  string<23>  HazelNut;
  Object  Cinnamon;
  any GooseBerry;
};

typedef struct Guava{
  float Sultana;
} Runnerbean;

union BrazilNut switch (long) {
  case 23:
    Runnerbean Parsnip;
  case -25:
    long Celery;
  default :
    short WhiteCabbage;
};

exception Cassava{
  Guava Oregano;
  Runnerbean Almonds;
  Guava Mushroom[3];
  Runnerbean Tofu[1];
};

exception Melon{
  BrazilNut SweetPotato;
  BrazilNut Orange[2];
  sequence<octet>  Tangarine;
  sequence<float>  GardenPeas[4];
  sequence<octet>  CantelopeMelon;
  Sweetcorn Apple;
  Sweetcorn Onion[5];
};

interface idlServer{

  exception RedGrapes{
    float Plum[34];
    double KidneyBean[12];
    long Zucchini[3];
    unsigned long ButterBean[6];
    short Avocado[1];
    unsigned short GoldenDelicous[32];
    char Lentil[9];
    boolean Fig[2];
    octet CrabApple[13];
    string RedOnion[2];
    string<15>  HazelNut[1];
    Object  Cinnamon[6];
    any GooseBerry[2];
  };

  void  JuniperBerries(
    in    long p1,
    out   Sweetcorn p2,
    inout octet p3
  ) raises (Mangetout);

  void  Daikan() raises (Cress, idlServer::RedGrapes);

  void  Thyme() raises (Cress, idlServer::RedGrapes);

  void  Lettuce() raises (Mangetout, Cress, BambooShoot, Cassava, Melon, RedGrapes);
};

