From 1d8445b8461f558987067d870f0f11cdc84b4f35 Mon Sep 17 00:00:00 2001 From: manuel Date: Sat, 31 Oct 2009 16:11:26 +0100 Subject: pushing task1 to repo --- task1/Makefile.man | 55 + task1/cairodocument.cpp | 124 + task1/cairodocument.h | 459 ++++ task1/certs/rootca.pem | 28 + task1/cli.cpp | 29 + task1/ehr.cpp | 6836 +++++++++++++++++++++++++++++++++++++++++++++++ task1/ehr.h | 4594 +++++++++++++++++++++++++++++++ task1/ehr.ice | 302 +++ task1/ehrclient.cpp | 496 ++++ task1/ehrclient.h | 164 ++ task1/getoptwrapper.cpp | 191 ++ task1/getoptwrapper.h | 231 ++ task1/security.cpp | 330 +++ task1/security.h | 119 + task1/utils.h | 53 + 15 files changed, 14011 insertions(+) create mode 100644 task1/Makefile.man create mode 100644 task1/cairodocument.cpp create mode 100644 task1/cairodocument.h create mode 100644 task1/certs/rootca.pem create mode 100644 task1/cli.cpp create mode 100644 task1/ehr.cpp create mode 100644 task1/ehr.h create mode 100644 task1/ehr.ice create mode 100644 task1/ehrclient.cpp create mode 100644 task1/ehrclient.h create mode 100644 task1/getoptwrapper.cpp create mode 100644 task1/getoptwrapper.h create mode 100644 task1/security.cpp create mode 100644 task1/security.h create mode 100644 task1/utils.h (limited to 'task1') diff --git a/task1/Makefile.man b/task1/Makefile.man new file mode 100644 index 0000000..1963667 --- /dev/null +++ b/task1/Makefile.man @@ -0,0 +1,55 @@ +# Makefile for ehr_cli +# Author: Manuel Mausz (0728348) + +# get ICE home +ICE_HOME= /usr +ifneq "$(wildcard /opt/Ice-3.3)" "" + ICE_HOME= /opt/Ice-3.3 +endif +ifneq "$(wildcard /opt/Ice-3.2)" "" + ICE_HOME= /opt/Ice-3.2 +endif +ARCH= $(shell uname -m | grep "_64" >/dev/null && echo "64") +ICE_LIB= $(ICE_HOME)/lib$(ARCH) +ICE_INC= $(ICE_HOME)/include +ICE_BIN= $(ICE_HOME)/bin + +# get cairomm +CAIROMM_LIBS= `pkg-config --libs "cairomm-1.0"` +CAIROMM_CFLAGS= `pkg-config --cflags "cairomm-1.0"` + +CC= g++ +LD= $(CC) +DEBUGFLAGS= -DNDEBUG +CFLAGS= -O -Wall $(DEBUGFLAGS) -I. -I$(ICE_INC) $(CAIROMM_CFLAGS) +LDFLAGS= -L$(ICE_LIB) -lIce -lIceUtil -lcrypto $(CAIROMM_LIBS) + +BIN= ehr_cli +OBJS= cairodocument.o getoptwrapper.o ehr.o security.o ehrclient.o cli.o +HEADERS= getoptwrapper.h ehr.ice security.h cairodocument.h ehrclient.h utils.h + +PATH:= $(ICE_BIN):${PATH} +SLICE2CPP= LD_LIBRARY_PATH=$(ICE_LIB):${LD_LIBRARY_PATH} \ + slice2cpp --header-ext h --source-ext cpp + +all: $(BIN) + +ehr.cpp ehr.h: ehr.ice + $(SLICE2CPP) --stream ehr.ice + +$(OBJS): %.o: %.cpp $(HEADERS) + $(CC) $(CFLAGS) -c $< -o $@ + +$(BIN): $(OBJS) + $(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) + +debug: + @$(MAKE) -f Makefile.man all "DEBUGFLAGS=-DDEBUG -g" + +clean: + rm -f $(OBJS) $(BIN) + rm -f ehr.cpp ehr.h + +.PHONY: clean + +# vim600: noet sw=8 ts=8 diff --git a/task1/cairodocument.cpp b/task1/cairodocument.cpp new file mode 100644 index 0000000..fb9b20e --- /dev/null +++ b/task1/cairodocument.cpp @@ -0,0 +1,124 @@ +/** + * $Id: cairodocument.cpp 2 2009-10-31 02:48:23Z l0728348 $ + * + * Copyright 2009 + * + * @author Manuel Mausz (0728348) + * @brief implements some classes to better use cairomm. + * however, the design is however crappy. + * maybe try using papyrus. + */ + +#include "cairodocument.h" + +using namespace std; +using namespace Cairo; + +static const double mmpt = 25.4/72; + +void CairoObject::apply(const Cairo::RefPtr context) +{ + if (m_objects.size()) + context->save(); + prepareObject(context); + for(CairoObjectList::iterator it = m_objects.begin(); it != m_objects.end(); ++it) + (*it)->apply(context); + applyObject(context); + if (m_objects.size()) + context->restore(); +} + +/*----------------------------------------------------------------------------*/ + +void CairoFont::applyObject(const Cairo::RefPtr context) +{ + context->set_font_size(m_size); + context->select_font_face(m_family, m_slant, m_weight); +} +/*----------------------------------------------------------------------------*/ + +double CairoFont::height() +{ + if (m_height >= 0) + return m_height; + Cairo::RefPtr surface = Cairo::ImageSurface::create(FORMAT_RGB24, 1, 1); + Cairo::RefPtr context = Cairo::Context::create(surface); + Cairo::FontExtents fextents; + applyObject(context); + context->get_font_extents(fextents); + m_height = fextents.height * mmpt; + return m_height; +} + +/*----------------------------------------------------------------------------*/ + +void CairoColor::applyObject(const Cairo::RefPtr context) +{ + context->set_source_rgba(m_red, m_green, m_blue, m_alpha); +} + +/*----------------------------------------------------------------------------*/ + +void CairoRectangle::applyObject(const Cairo::RefPtr context) +{ + context->set_line_width(m_linewidth / mmpt); + context->rectangle(m_x / mmpt, m_y / mmpt, m_width / mmpt, m_height / mmpt); + context->stroke(); +} + +/*----------------------------------------------------------------------------*/ + +CairoTextBox& CairoTextBox::addBorder(const double linewidth, CairoObject *obj) +{ + CairoRectangle *rectangle = new CairoRectangle(m_x, m_y, m_width, m_height, linewidth); + m_rectangles.push_back(rectangle); + if (obj != NULL) + rectangle->add(*obj); + add(*rectangle); + return *this; +} + +/*----------------------------------------------------------------------------*/ + +void CairoTextBox::applyObject(const Cairo::RefPtr context) +{ + Cairo::FontExtents fextents; + context->get_font_extents(fextents); + size_t cut; + int x = 1; + string text = m_text.str(); + while((cut = text.find_first_of('\n')) != string::npos) + { + context->move_to(m_x / mmpt, (m_y + m_padding) / mmpt + x * fextents.height); + context->show_text(text.substr(0, cut)); + text = text.substr(cut + 1); + ++x; + } + context->move_to(m_x / mmpt, (m_y + m_padding) / mmpt + x * fextents.height); + context->show_text(text); +} + +/*----------------------------------------------------------------------------*/ + +bool CairoDocument::save(const std::string& filename, const OutputFormat format) +{ + Cairo::RefPtr surface; + switch(format) + { +#ifdef CAIRO_HAS_PDF_SURFACE + case PDF: + surface = PdfSurface::create(filename, m_width / mmpt, m_height / mmpt); + break; +#endif + default: + return false; + } + + Cairo::RefPtr context = Cairo::Context::create(surface); + apply(context); + surface->finish(); + + return true; +} + +/* vim: set et sw=2 ts=2: */ diff --git a/task1/cairodocument.h b/task1/cairodocument.h new file mode 100644 index 0000000..7769c7e --- /dev/null +++ b/task1/cairodocument.h @@ -0,0 +1,459 @@ +/** + * $Id: cairodocument.h 2 2009-10-31 02:48:23Z l0728348 $ + * + * Copyright 2009 + * + * @author Manuel Mausz (0728348) + * @brief implements some classes to better use cairomm. + * however, the design is however crappy. + * maybe try using papyrus. + */ + +#ifndef CAIRODOCUMENT_H +#define CAIRODOCUMENT_H + +#include +#include +#include +#include + +/* forward declerations */ +class CairoObject; +class CairoFont; +class CairoColor; +class CairoRectangle; +class CairoTextBox; +class CairoDocument; + +/** + * abstract class for all classes of this file + * design: every object can contain other objects, which will + * get applied before applying the actual object + */ +class CairoObject +{ + public: + /** objectlist to contain */ + typedef std::list CairoObjectList; + + /** + * @brief Default dtor. virtual + */ + virtual ~CairoObject() + {} + + /** + * @brief adds another CairoObject to this CairoObject + * @param obj reference to the CairoObject to add + * @return reference to this object + */ + CairoObject& add(CairoObject& obj) + { + if (&obj != this) + m_objects.push_back(&obj); + return *this; + } + + /** + * @brief adds another CairoObject to this CairoObject + * @param obj reference to the CairoObject to add + * @return reference to this object + */ + CairoObject& operator()(CairoObject& obj) + { + return add(obj); + } + + /** + * @brief applys this CairoObject to the current context + * all containing objects will be applied before + * @param context cairomm context + */ + void apply(const Cairo::RefPtr context); + + /** + * @brief prepares this object for applying + * will be called be applyObject() + * @param context cairomm context + */ + virtual void prepareObject(const Cairo::RefPtr context) + {} + + /** + * @brief applies this object to the current context + * @param context cairomm context + */ + virtual void applyObject(const Cairo::RefPtr context) = 0; + + protected: + /** list of cairoobjects in this cairoobject */ + CairoObjectList m_objects; +}; + +/*----------------------------------------------------------------------------*/ + +/** + * represents a font in cairomm + */ +class CairoFont +: public CairoObject +{ + public: + /** + * @brief Default dtor + * @param size fontsize + * @param family fontfamily + * @param slant type of slant + * @param weight font weight + */ + CairoFont(const double size, const std::string& family, Cairo::FontSlant slant = Cairo::FONT_SLANT_NORMAL, + Cairo::FontWeight weight = Cairo::FONT_WEIGHT_NORMAL) + : m_size(size), m_family(family), m_slant(slant), m_weight(weight), m_height(-1) + {} + + /** + * Default dtor + */ + ~CairoFont() + {} + + /** + * @brief get height of current object + * @return height of current object + */ + double height(); + + /** + * @brief applies this object to the current context + * @param context cairomm context + */ + void applyObject(const Cairo::RefPtr context); + + private: + double m_size; + std::string m_family; + Cairo::FontSlant m_slant; + Cairo::FontWeight m_weight; + double m_height; +}; + +/*----------------------------------------------------------------------------*/ + +/** + * represents a color in cairomm + */ +class CairoColor +: public CairoObject +{ + public: + /** + * @brief Default dtor + * @param red value for red part (0 to 1) + * @param green value for green part (0 to 1) + * @param blue value for blue part (0 to 1) + * @param alpha value for alpha (0 to 1) + */ + CairoColor(const double red = 0.0, const double green = 0.0, const double blue = 0.0, + const double alpha = 1.0) + : m_red(red), m_green(green), m_blue(blue), m_alpha(alpha) + {} + + /** + * Default dtor + */ + ~CairoColor() + {} + + /** + * @brief applies this object to the current context + * @param context cairomm context + */ + void applyObject(const Cairo::RefPtr context); + + private: + double m_red, m_green, m_blue; + double m_alpha; +}; + +/*----------------------------------------------------------------------------*/ + +/** + * creates a rectangle in cairomm + */ +class CairoRectangle +: public CairoObject +{ + public: + /** + * @brief Default dtor + * @param x x-coordinates to start + * @param y y-coordinates to start + * @param width rectangle width + * @param height rectangle height + * @param linewidth linewidth for rectangle + */ + CairoRectangle(const double x, const double y, const double width, const double height, + const double linewidth = 0.2) + : m_x(x), m_y(y), m_width(width), m_height(height), m_linewidth(linewidth) + {} + + /** + * Default dtor + */ + CairoRectangle() + {} + + /** + * @brief get x-coordinate of current object + * @return x-coordinate of current object + */ + double x() + { + return m_x; + } + + /** + * @brief get y-coordinate of current object + * @return y-coordinate of current object + */ + double y() + { + return m_y; + } + + /** + * @brief get height of current object + * @return height of current object + */ + double height() + { + return m_height; + } + + /** + * @brief get width of current object + * @return width of current object + */ + double width() + { + return m_width; + } + + /** + * @brief applies this object to the current context + * @param context cairomm context + */ + void applyObject(const Cairo::RefPtr context); + + private: + double m_x, m_y; + double m_width, m_height; + double m_linewidth; +}; + +/*----------------------------------------------------------------------------*/ + +/** + * creates a textbox using cairomm + */ +class CairoTextBox +: public CairoObject +{ + public: + /** + * @brief Default dtor + * @param x x-coordinates to start + * @param y y-coordinates to start + * @param width rectangle width + * @param height rectangle height + * @param padding padding for textbox + */ + CairoTextBox(const double x, const double y, const double width, const double height, + const double padding = 0) + : m_x(x), m_y(y), m_width(width), m_height(height), m_padding(padding), m_text("") + {} + + /** + * Default dtor + * deletes allocated rectangle objects for borders + */ + ~CairoTextBox() + { + for(CairoRectangleList::iterator it = m_rectangles.begin(); it != m_rectangles.end(); ++it) + delete *it; + } + + /** + * @brief add text to this textbox + * @param text text to add + */ + void addText(const std::string& text) + { + m_text << text; + } + + /** + * @brief istream operator to add text to this textbox + * @param text text to add + * @return reference to this object + */ + CairoTextBox& operator<<(std::string text) + { + m_text << text; + return *this; + } + + /** + * @brief istream operator to add a integer to this textbox + * @param num integer to add + * @return reference to this object + */ + CairoTextBox& operator<<(int num) + { + m_text << num; + return *this; + } + + /** + * @brief adds border around this textbox + * using a dynamically allocated rectangle object + * @param linewidth linewidth for the border + * @param obj pointer to object which will be added to the + * dynamically allocated border + * @return reference to this object + */ + CairoTextBox& addBorder(const double linewidth = 0.2, CairoObject *obj = NULL); + + /** + * @brief get x-coordinate of current object + * @return x-coordinate of current object + */ + double x() + { + return m_x; + } + + /** + * @brief get y-coordinate of current object + * @return y-coordinate of current object + */ + double y() + { + return m_y; + } + + /** + * @brief get height of current object + * @return height of current object + */ + double height() + { + return m_height; + } + + /** + * @brief get width of current object + * @return width of current object + */ + double width() + { + return m_width; + } + + /** + * @brief get padding of current object + * @return padding of current object + */ + double padding() + { + return m_padding; + } + + /** + * @brief applies this object to the current context + * @param context cairomm context + */ + void applyObject(const Cairo::RefPtr context); + + private: + /** rectangelist for added borders */ + typedef std::list CairoRectangleList; + + double m_x, m_y; + double m_width, m_height; + double m_padding; + std::stringstream m_text; + CairoRectangleList m_rectangles; +}; + +/*----------------------------------------------------------------------------*/ + +/** + * creates a document using cairomm + */ +class CairoDocument +: public CairoObject +{ + public: + /** valid outout formats for the document */ + enum OutputFormat + { +#ifdef CAIRO_HAS_PDF_SURFACE + PDF, +#endif + }; + + /** + * @brief Default dtor + * @param width width of document + * @param height height of document + */ + CairoDocument(const unsigned width, const unsigned height) + : m_width(width), m_height(height) + {} + + /** + * Default dtor + */ + ~CairoDocument() + {} + + /** + * @brief applies this object to the current context + * @param context cairomm context + */ + void applyObject(const Cairo::RefPtr context) + {} + + /** + * @brief generates and saves the current document + * @param filename filename for document + * @param format output format for document + */ + bool save(const std::string& filename, const OutputFormat format); + + /** + * @brief get width of current object + * @return width of current object + */ + unsigned width() + { + return m_width; + } + + /** + * @brief get height of current object + * @return height of current object + */ + unsigned height() + { + return m_height; + } + + private: + unsigned m_width, m_height; +}; + +#endif + +/* vim: set et sw=2 ts=2: */ diff --git a/task1/certs/rootca.pem b/task1/certs/rootca.pem new file mode 100644 index 0000000..03311e3 --- /dev/null +++ b/task1/certs/rootca.pem @@ -0,0 +1,28 @@ +-----BEGIN CERTIFICATE----- +MIIEyjCCA7KgAwIBAgIJAJDbsKVizoHiMA0GCSqGSIb3DQEBBQUAMIGeMRQwEgYD +VQQDEwtTRS9MaW51eCBDQTELMAkGA1UEBhMCQVQxDzANBgNVBAgTBlZpZW5uYTEP +MA0GA1UEBxMGVmllbm5hMSMwIQYDVQQKExpzZS1saW51eC5pbnNvLnR1d2llbi5h +Yy5hdDEyMDAGCSqGSIb3DQEJARYjZGV2Lm51bGxAc2UtbGludXguaW5zby50dXdp +ZW4uYWMuYXQwHhcNMDgwMzE1MTI1MTA4WhcNMTMwMzE0MTI1MTA4WjCBnjEUMBIG +A1UEAxMLU0UvTGludXggQ0ExCzAJBgNVBAYTAkFUMQ8wDQYDVQQIEwZWaWVubmEx +DzANBgNVBAcTBlZpZW5uYTEjMCEGA1UEChMac2UtbGludXguaW5zby50dXdpZW4u +YWMuYXQxMjAwBgkqhkiG9w0BCQEWI2Rldi5udWxsQHNlLWxpbnV4Lmluc28udHV3 +aWVuLmFjLmF0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt+mlUQ8w +Wvf6fFjGt1xLTM2Vdwmctugwtde19M6/Gpr5nuOmcFMhzVOSUAIrQK/gVBT5Rsuy +XSYSVLLW46O1sF5B8hI83+LI66mC+DS9KwOTL5+QcwKlE7CDvp+fcp9i6fHpSo1x +ort1qNedwJBSqmU0S/iYBOpekedf4meAiQ2LSmqYFX/m7dlfpygadHfpRjSmND1E +2VesJKLVi0+iCL1W7uXt2dNcExDSAxnVlpA7nZ1UNxRuBgQtckMmZoE7Z7gdSRM6 +T3a7NxnJ/Z1PfNL4jPwwFN3+rhA1hTJpNVM9aZprQbu7yg4YxhEUwXz0WFkh4Emr +lmKH1vLcQbM9owIDAQABo4IBBzCCAQMwHQYDVR0OBBYEFA2L1XV6YNtCNUFR0WZR +Hw0URcepMIHTBgNVHSMEgcswgciAFA2L1XV6YNtCNUFR0WZRHw0URcepoYGkpIGh +MIGeMRQwEgYDVQQDEwtTRS9MaW51eCBDQTELMAkGA1UEBhMCQVQxDzANBgNVBAgT +BlZpZW5uYTEPMA0GA1UEBxMGVmllbm5hMSMwIQYDVQQKExpzZS1saW51eC5pbnNv +LnR1d2llbi5hYy5hdDEyMDAGCSqGSIb3DQEJARYjZGV2Lm51bGxAc2UtbGludXgu +aW5zby50dXdpZW4uYWMuYXSCCQCQ27ClYs6B4jAMBgNVHRMEBTADAQH/MA0GCSqG +SIb3DQEBBQUAA4IBAQArc7FBm5PXVWFENlS3CX2nqfy2AflnVV1jS0SuMVeVKG+y +x9DqlE3Fzei7OyNM9jSUPLZlvNzEHodHj5LVy98kAVzZ6O+cTlNnaax6FNWuZVvb +LPTSwuzHUO+E7X4yRfNxxiiJOWmCNbbP5ofERIPJwsxwp1g3sW5VV80oAGSueAby +KrQX/3OYiXLz5Lg+wWPU0/7hrUwnADi1HXC0pOJcEH8UyYpIWdIrAQNzYx0i8RTm +kojRaQBMSdNK9sLbuZju0hBSueGGfdv49AshZiV3hghw8iDbLKGZcolxcvmlK0+L +crnCz3BH7e7OeUJBO/iZ/UztRM1p1SgSmnEeDGFv +-----END CERTIFICATE----- diff --git a/task1/cli.cpp b/task1/cli.cpp new file mode 100644 index 0000000..ae175fd --- /dev/null +++ b/task1/cli.cpp @@ -0,0 +1,29 @@ +/** + * $Id: cli.cpp 2 2009-10-31 02:48:23Z l0728348 $ + * + * Copyright 2009 + * + * @author Manuel Mausz (0728348) + * @brief main application of ehr_cli + */ + +#include "ehrclient.h" + +/** + * main application of ehr_cli + * initiales IceSSL and starts the application + */ +int main(int argc, char* argv[]) +{ + /* load IceSSL */ + Ice::InitializationData initdata; + initdata.properties = Ice::createProperties(); + initdata.properties->setProperty("Ice.InitPlugins", "0"); // we do this ourself + initdata.properties->setProperty("Ice.Plugin.IceSSL", "IceSSL:createIceSSL"); + + /* create our ehr client */ + EhrClient cli; + return cli.main(argc, argv, initdata); +} + +/* vim: set et sw=2 ts=2: */ diff --git a/task1/ehr.cpp b/task1/ehr.cpp new file mode 100644 index 0000000..29b45e9 --- /dev/null +++ b/task1/ehr.cpp @@ -0,0 +1,6836 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +// Ice version 3.3.1 +// Generated from file `ehr.ice' + +#include +#include +#include +#include +#include +#include +#include + +#ifndef ICE_IGNORE_VERSION +# if ICE_INT_VERSION / 100 != 303 +# error Ice version mismatch! +# endif +# if ICE_INT_VERSION % 100 > 50 +# error Beta header file detected +# endif +# if ICE_INT_VERSION % 100 < 1 +# error Ice patch level mismatch! +# endif +#endif + +static const ::std::string __Ehr__Provider__createPrescription_name = "createPrescription"; + +static const ::std::string __Ehr__Provider__consumePrescription_name = "consumePrescription"; + +static const ::std::string __Ehr__Provider__listDocuments_name = "listDocuments"; + +static const ::std::string __Ehr__Provider__findDocuments_name = "findDocuments"; + +static const ::std::string __Ehr__Provider__setDefaultAccess_name = "setDefaultAccess"; + +static const ::std::string __Ehr__Provider__createPermission_name = "createPermission"; + +static const ::std::string __Ehr__Provider__listPermissions_name = "listPermissions"; + +static const ::std::string __Ehr__Provider__removePermission_name = "removePermission"; + +::Ice::Object* IceInternal::upCast(::Ehr::Document* p) { return p; } +::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::Ehr::Document* p) { return p; } + +::Ice::Object* IceInternal::upCast(::Ehr::Prescription* p) { return p; } +::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::Ehr::Prescription* p) { return p; } + +::Ice::Object* IceInternal::upCast(::Ehr::ConsumedPrescription* p) { return p; } +::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::Ehr::ConsumedPrescription* p) { return p; } + +::Ice::Object* IceInternal::upCast(::Ehr::Request* p) { return p; } +::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::Ehr::Request* p) { return p; } + +::Ice::Object* IceInternal::upCast(::Ehr::ThirdPartyRequest* p) { return p; } +::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::Ehr::ThirdPartyRequest* p) { return p; } + +::Ice::Object* IceInternal::upCast(::Ehr::CreatePrescriptionRequest* p) { return p; } +::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::Ehr::CreatePrescriptionRequest* p) { return p; } + +::Ice::Object* IceInternal::upCast(::Ehr::ConsumePrescriptionRequest* p) { return p; } +::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::Ehr::ConsumePrescriptionRequest* p) { return p; } + +::Ice::Object* IceInternal::upCast(::Ehr::ListDocumentsRequest* p) { return p; } +::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::Ehr::ListDocumentsRequest* p) { return p; } + +::Ice::Object* IceInternal::upCast(::Ehr::FindDocumentsRequest* p) { return p; } +::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::Ehr::FindDocumentsRequest* p) { return p; } + +::Ice::Object* IceInternal::upCast(::Ehr::CreatePermissionRequest* p) { return p; } +::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::Ehr::CreatePermissionRequest* p) { return p; } + +::Ice::Object* IceInternal::upCast(::Ehr::SetDefaultAccessRequest* p) { return p; } +::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::Ehr::SetDefaultAccessRequest* p) { return p; } + +::Ice::Object* IceInternal::upCast(::Ehr::ListPermissionsRequest* p) { return p; } +::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::Ehr::ListPermissionsRequest* p) { return p; } + +::Ice::Object* IceInternal::upCast(::Ehr::RemovePermissionRequest* p) { return p; } +::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::Ehr::RemovePermissionRequest* p) { return p; } + +::Ice::Object* IceInternal::upCast(::Ehr::Provider* p) { return p; } +::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::Ehr::Provider* p) { return p; } + +void +Ehr::__read(::IceInternal::BasicStream* __is, ::Ehr::DocumentPrx& v) +{ + ::Ice::ObjectPrx proxy; + __is->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::Document; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeDocumentPrx(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::DocumentPrx& v) +{ + __outS->writeProxy(v); +} + +void +Ehr::ice_readDocumentPrx(const ::Ice::InputStreamPtr& __inS, ::Ehr::DocumentPrx& v) +{ + ::Ice::ObjectPrx proxy = __inS->readProxy(); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::Document; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeDocument(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::DocumentPtr& v) +{ + __outS->writeObject(v); +} + +void +Ehr::ice_readDocument(const ::Ice::InputStreamPtr& __inS, ::Ehr::DocumentPtr& __v) +{ + ::Ice::ReadObjectCallbackPtr __cb = new ::Ice::ReadObjectCallbackI(::Ehr::__patch__DocumentPtr, &__v); + __inS->readObject(__cb); +} + +void +Ehr::__read(::IceInternal::BasicStream* __is, ::Ehr::PrescriptionPrx& v) +{ + ::Ice::ObjectPrx proxy; + __is->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::Prescription; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writePrescriptionPrx(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::PrescriptionPrx& v) +{ + __outS->writeProxy(v); +} + +void +Ehr::ice_readPrescriptionPrx(const ::Ice::InputStreamPtr& __inS, ::Ehr::PrescriptionPrx& v) +{ + ::Ice::ObjectPrx proxy = __inS->readProxy(); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::Prescription; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writePrescription(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::PrescriptionPtr& v) +{ + __outS->writeObject(v); +} + +void +Ehr::ice_readPrescription(const ::Ice::InputStreamPtr& __inS, ::Ehr::PrescriptionPtr& __v) +{ + ::Ice::ReadObjectCallbackPtr __cb = new ::Ice::ReadObjectCallbackI(::Ehr::__patch__PrescriptionPtr, &__v); + __inS->readObject(__cb); +} + +void +Ehr::__read(::IceInternal::BasicStream* __is, ::Ehr::ConsumedPrescriptionPrx& v) +{ + ::Ice::ObjectPrx proxy; + __is->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::ConsumedPrescription; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeConsumedPrescriptionPrx(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::ConsumedPrescriptionPrx& v) +{ + __outS->writeProxy(v); +} + +void +Ehr::ice_readConsumedPrescriptionPrx(const ::Ice::InputStreamPtr& __inS, ::Ehr::ConsumedPrescriptionPrx& v) +{ + ::Ice::ObjectPrx proxy = __inS->readProxy(); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::ConsumedPrescription; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeConsumedPrescription(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::ConsumedPrescriptionPtr& v) +{ + __outS->writeObject(v); +} + +void +Ehr::ice_readConsumedPrescription(const ::Ice::InputStreamPtr& __inS, ::Ehr::ConsumedPrescriptionPtr& __v) +{ + ::Ice::ReadObjectCallbackPtr __cb = new ::Ice::ReadObjectCallbackI(::Ehr::__patch__ConsumedPrescriptionPtr, &__v); + __inS->readObject(__cb); +} + +void +Ehr::__read(::IceInternal::BasicStream* __is, ::Ehr::RequestPrx& v) +{ + ::Ice::ObjectPrx proxy; + __is->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::Request; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeRequestPrx(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::RequestPrx& v) +{ + __outS->writeProxy(v); +} + +void +Ehr::ice_readRequestPrx(const ::Ice::InputStreamPtr& __inS, ::Ehr::RequestPrx& v) +{ + ::Ice::ObjectPrx proxy = __inS->readProxy(); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::Request; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeRequest(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::RequestPtr& v) +{ + __outS->writeObject(v); +} + +void +Ehr::ice_readRequest(const ::Ice::InputStreamPtr& __inS, ::Ehr::RequestPtr& __v) +{ + ::Ice::ReadObjectCallbackPtr __cb = new ::Ice::ReadObjectCallbackI(::Ehr::__patch__RequestPtr, &__v); + __inS->readObject(__cb); +} + +void +Ehr::__read(::IceInternal::BasicStream* __is, ::Ehr::ThirdPartyRequestPrx& v) +{ + ::Ice::ObjectPrx proxy; + __is->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::ThirdPartyRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeThirdPartyRequestPrx(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::ThirdPartyRequestPrx& v) +{ + __outS->writeProxy(v); +} + +void +Ehr::ice_readThirdPartyRequestPrx(const ::Ice::InputStreamPtr& __inS, ::Ehr::ThirdPartyRequestPrx& v) +{ + ::Ice::ObjectPrx proxy = __inS->readProxy(); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::ThirdPartyRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeThirdPartyRequest(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::ThirdPartyRequestPtr& v) +{ + __outS->writeObject(v); +} + +void +Ehr::ice_readThirdPartyRequest(const ::Ice::InputStreamPtr& __inS, ::Ehr::ThirdPartyRequestPtr& __v) +{ + ::Ice::ReadObjectCallbackPtr __cb = new ::Ice::ReadObjectCallbackI(::Ehr::__patch__ThirdPartyRequestPtr, &__v); + __inS->readObject(__cb); +} + +void +Ehr::__read(::IceInternal::BasicStream* __is, ::Ehr::CreatePrescriptionRequestPrx& v) +{ + ::Ice::ObjectPrx proxy; + __is->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::CreatePrescriptionRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeCreatePrescriptionRequestPrx(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::CreatePrescriptionRequestPrx& v) +{ + __outS->writeProxy(v); +} + +void +Ehr::ice_readCreatePrescriptionRequestPrx(const ::Ice::InputStreamPtr& __inS, ::Ehr::CreatePrescriptionRequestPrx& v) +{ + ::Ice::ObjectPrx proxy = __inS->readProxy(); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::CreatePrescriptionRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeCreatePrescriptionRequest(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::CreatePrescriptionRequestPtr& v) +{ + __outS->writeObject(v); +} + +void +Ehr::ice_readCreatePrescriptionRequest(const ::Ice::InputStreamPtr& __inS, ::Ehr::CreatePrescriptionRequestPtr& __v) +{ + ::Ice::ReadObjectCallbackPtr __cb = new ::Ice::ReadObjectCallbackI(::Ehr::__patch__CreatePrescriptionRequestPtr, &__v); + __inS->readObject(__cb); +} + +void +Ehr::__read(::IceInternal::BasicStream* __is, ::Ehr::ConsumePrescriptionRequestPrx& v) +{ + ::Ice::ObjectPrx proxy; + __is->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::ConsumePrescriptionRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeConsumePrescriptionRequestPrx(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::ConsumePrescriptionRequestPrx& v) +{ + __outS->writeProxy(v); +} + +void +Ehr::ice_readConsumePrescriptionRequestPrx(const ::Ice::InputStreamPtr& __inS, ::Ehr::ConsumePrescriptionRequestPrx& v) +{ + ::Ice::ObjectPrx proxy = __inS->readProxy(); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::ConsumePrescriptionRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeConsumePrescriptionRequest(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::ConsumePrescriptionRequestPtr& v) +{ + __outS->writeObject(v); +} + +void +Ehr::ice_readConsumePrescriptionRequest(const ::Ice::InputStreamPtr& __inS, ::Ehr::ConsumePrescriptionRequestPtr& __v) +{ + ::Ice::ReadObjectCallbackPtr __cb = new ::Ice::ReadObjectCallbackI(::Ehr::__patch__ConsumePrescriptionRequestPtr, &__v); + __inS->readObject(__cb); +} + +void +Ehr::__read(::IceInternal::BasicStream* __is, ::Ehr::ListDocumentsRequestPrx& v) +{ + ::Ice::ObjectPrx proxy; + __is->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::ListDocumentsRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeListDocumentsRequestPrx(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::ListDocumentsRequestPrx& v) +{ + __outS->writeProxy(v); +} + +void +Ehr::ice_readListDocumentsRequestPrx(const ::Ice::InputStreamPtr& __inS, ::Ehr::ListDocumentsRequestPrx& v) +{ + ::Ice::ObjectPrx proxy = __inS->readProxy(); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::ListDocumentsRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeListDocumentsRequest(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::ListDocumentsRequestPtr& v) +{ + __outS->writeObject(v); +} + +void +Ehr::ice_readListDocumentsRequest(const ::Ice::InputStreamPtr& __inS, ::Ehr::ListDocumentsRequestPtr& __v) +{ + ::Ice::ReadObjectCallbackPtr __cb = new ::Ice::ReadObjectCallbackI(::Ehr::__patch__ListDocumentsRequestPtr, &__v); + __inS->readObject(__cb); +} + +void +Ehr::__read(::IceInternal::BasicStream* __is, ::Ehr::FindDocumentsRequestPrx& v) +{ + ::Ice::ObjectPrx proxy; + __is->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::FindDocumentsRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeFindDocumentsRequestPrx(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::FindDocumentsRequestPrx& v) +{ + __outS->writeProxy(v); +} + +void +Ehr::ice_readFindDocumentsRequestPrx(const ::Ice::InputStreamPtr& __inS, ::Ehr::FindDocumentsRequestPrx& v) +{ + ::Ice::ObjectPrx proxy = __inS->readProxy(); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::FindDocumentsRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeFindDocumentsRequest(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::FindDocumentsRequestPtr& v) +{ + __outS->writeObject(v); +} + +void +Ehr::ice_readFindDocumentsRequest(const ::Ice::InputStreamPtr& __inS, ::Ehr::FindDocumentsRequestPtr& __v) +{ + ::Ice::ReadObjectCallbackPtr __cb = new ::Ice::ReadObjectCallbackI(::Ehr::__patch__FindDocumentsRequestPtr, &__v); + __inS->readObject(__cb); +} + +void +Ehr::__read(::IceInternal::BasicStream* __is, ::Ehr::CreatePermissionRequestPrx& v) +{ + ::Ice::ObjectPrx proxy; + __is->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::CreatePermissionRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeCreatePermissionRequestPrx(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::CreatePermissionRequestPrx& v) +{ + __outS->writeProxy(v); +} + +void +Ehr::ice_readCreatePermissionRequestPrx(const ::Ice::InputStreamPtr& __inS, ::Ehr::CreatePermissionRequestPrx& v) +{ + ::Ice::ObjectPrx proxy = __inS->readProxy(); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::CreatePermissionRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeCreatePermissionRequest(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::CreatePermissionRequestPtr& v) +{ + __outS->writeObject(v); +} + +void +Ehr::ice_readCreatePermissionRequest(const ::Ice::InputStreamPtr& __inS, ::Ehr::CreatePermissionRequestPtr& __v) +{ + ::Ice::ReadObjectCallbackPtr __cb = new ::Ice::ReadObjectCallbackI(::Ehr::__patch__CreatePermissionRequestPtr, &__v); + __inS->readObject(__cb); +} + +void +Ehr::__read(::IceInternal::BasicStream* __is, ::Ehr::SetDefaultAccessRequestPrx& v) +{ + ::Ice::ObjectPrx proxy; + __is->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::SetDefaultAccessRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeSetDefaultAccessRequestPrx(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::SetDefaultAccessRequestPrx& v) +{ + __outS->writeProxy(v); +} + +void +Ehr::ice_readSetDefaultAccessRequestPrx(const ::Ice::InputStreamPtr& __inS, ::Ehr::SetDefaultAccessRequestPrx& v) +{ + ::Ice::ObjectPrx proxy = __inS->readProxy(); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::SetDefaultAccessRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeSetDefaultAccessRequest(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::SetDefaultAccessRequestPtr& v) +{ + __outS->writeObject(v); +} + +void +Ehr::ice_readSetDefaultAccessRequest(const ::Ice::InputStreamPtr& __inS, ::Ehr::SetDefaultAccessRequestPtr& __v) +{ + ::Ice::ReadObjectCallbackPtr __cb = new ::Ice::ReadObjectCallbackI(::Ehr::__patch__SetDefaultAccessRequestPtr, &__v); + __inS->readObject(__cb); +} + +void +Ehr::__read(::IceInternal::BasicStream* __is, ::Ehr::ListPermissionsRequestPrx& v) +{ + ::Ice::ObjectPrx proxy; + __is->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::ListPermissionsRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeListPermissionsRequestPrx(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::ListPermissionsRequestPrx& v) +{ + __outS->writeProxy(v); +} + +void +Ehr::ice_readListPermissionsRequestPrx(const ::Ice::InputStreamPtr& __inS, ::Ehr::ListPermissionsRequestPrx& v) +{ + ::Ice::ObjectPrx proxy = __inS->readProxy(); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::ListPermissionsRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeListPermissionsRequest(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::ListPermissionsRequestPtr& v) +{ + __outS->writeObject(v); +} + +void +Ehr::ice_readListPermissionsRequest(const ::Ice::InputStreamPtr& __inS, ::Ehr::ListPermissionsRequestPtr& __v) +{ + ::Ice::ReadObjectCallbackPtr __cb = new ::Ice::ReadObjectCallbackI(::Ehr::__patch__ListPermissionsRequestPtr, &__v); + __inS->readObject(__cb); +} + +void +Ehr::__read(::IceInternal::BasicStream* __is, ::Ehr::RemovePermissionRequestPrx& v) +{ + ::Ice::ObjectPrx proxy; + __is->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::RemovePermissionRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeRemovePermissionRequestPrx(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::RemovePermissionRequestPrx& v) +{ + __outS->writeProxy(v); +} + +void +Ehr::ice_readRemovePermissionRequestPrx(const ::Ice::InputStreamPtr& __inS, ::Ehr::RemovePermissionRequestPrx& v) +{ + ::Ice::ObjectPrx proxy = __inS->readProxy(); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::RemovePermissionRequest; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeRemovePermissionRequest(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::RemovePermissionRequestPtr& v) +{ + __outS->writeObject(v); +} + +void +Ehr::ice_readRemovePermissionRequest(const ::Ice::InputStreamPtr& __inS, ::Ehr::RemovePermissionRequestPtr& __v) +{ + ::Ice::ReadObjectCallbackPtr __cb = new ::Ice::ReadObjectCallbackI(::Ehr::__patch__RemovePermissionRequestPtr, &__v); + __inS->readObject(__cb); +} + +void +Ehr::__read(::IceInternal::BasicStream* __is, ::Ehr::ProviderPrx& v) +{ + ::Ice::ObjectPrx proxy; + __is->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::Provider; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeProviderPrx(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::ProviderPrx& v) +{ + __outS->writeProxy(v); +} + +void +Ehr::ice_readProviderPrx(const ::Ice::InputStreamPtr& __inS, ::Ehr::ProviderPrx& v) +{ + ::Ice::ObjectPrx proxy = __inS->readProxy(); + if(!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::Ehr::Provider; + v->__copyFrom(proxy); + } +} + +void +Ehr::ice_writeProvider(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::ProviderPtr& v) +{ + __outS->writeObject(v); +} + +void +Ehr::ice_readProvider(const ::Ice::InputStreamPtr& __inS, ::Ehr::ProviderPtr& __v) +{ + ::Ice::ReadObjectCallbackPtr __cb = new ::Ice::ReadObjectCallbackI(::Ehr::__patch__ProviderPtr, &__v); + __inS->readObject(__cb); +} + +Ehr::EhrException::EhrException(const ::std::string& __ice_what) : +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + UserException(), +#else + ::Ice::UserException(), +#endif + what(__ice_what) +{ +} + +Ehr::EhrException::~EhrException() throw() +{ +} + +static const char* __Ehr__EhrException_name = "Ehr::EhrException"; + +::std::string +Ehr::EhrException::ice_name() const +{ + return __Ehr__EhrException_name; +} + +::Ice::Exception* +Ehr::EhrException::ice_clone() const +{ + return new EhrException(*this); +} + +void +Ehr::EhrException::ice_throw() const +{ + throw *this; +} + +void +Ehr::EhrException::__write(::IceInternal::BasicStream* __os) const +{ + __os->write(::std::string("::Ehr::EhrException"), false); + __os->startWriteSlice(); + __os->write(what); + __os->endWriteSlice(); +} + +void +Ehr::EhrException::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->read(myId, false); + } + __is->startReadSlice(); + __is->read(what); + __is->endReadSlice(); +} + +void +Ehr::EhrException::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeString(::std::string("::Ehr::EhrException")); + __outS->startSlice(); + __outS->writeString(what); + __outS->endSlice(); +} + +void +Ehr::EhrException::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readString(); + } + __inS->startSlice(); + what = __inS->readString(); + __inS->endSlice(); +} + +struct __F__Ehr__EhrException : public ::IceInternal::UserExceptionFactory +{ + virtual void + createAndThrow() + { + throw ::Ehr::EhrException(); + } +}; + +static ::IceInternal::UserExceptionFactoryPtr __F__Ehr__EhrException__Ptr = new __F__Ehr__EhrException; + +const ::IceInternal::UserExceptionFactoryPtr& +Ehr::EhrException::ice_factory() +{ + return __F__Ehr__EhrException__Ptr; +} + +class __F__Ehr__EhrException__Init +{ +public: + + __F__Ehr__EhrException__Init() + { + ::IceInternal::factoryTable->addExceptionFactory("::Ehr::EhrException", ::Ehr::EhrException::ice_factory()); + } + + ~__F__Ehr__EhrException__Init() + { + ::IceInternal::factoryTable->removeExceptionFactory("::Ehr::EhrException"); + } +}; + +static __F__Ehr__EhrException__Init __F__Ehr__EhrException__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__EhrException__initializer() {} } +#endif + +Ehr::InvalidRequestException::InvalidRequestException(const ::std::string& __ice_what) : +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + EhrException(__ice_what) +#else + ::Ehr::EhrException(__ice_what) +#endif +{ +} + +Ehr::InvalidRequestException::~InvalidRequestException() throw() +{ +} + +static const char* __Ehr__InvalidRequestException_name = "Ehr::InvalidRequestException"; + +::std::string +Ehr::InvalidRequestException::ice_name() const +{ + return __Ehr__InvalidRequestException_name; +} + +::Ice::Exception* +Ehr::InvalidRequestException::ice_clone() const +{ + return new InvalidRequestException(*this); +} + +void +Ehr::InvalidRequestException::ice_throw() const +{ + throw *this; +} + +void +Ehr::InvalidRequestException::__write(::IceInternal::BasicStream* __os) const +{ + __os->write(::std::string("::Ehr::InvalidRequestException"), false); + __os->startWriteSlice(); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + EhrException::__write(__os); +#else + ::Ehr::EhrException::__write(__os); +#endif +} + +void +Ehr::InvalidRequestException::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->read(myId, false); + } + __is->startReadSlice(); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + EhrException::__read(__is, true); +#else + ::Ehr::EhrException::__read(__is, true); +#endif +} + +void +Ehr::InvalidRequestException::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeString(::std::string("::Ehr::InvalidRequestException")); + __outS->startSlice(); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + EhrException::__write(__outS); +#else + ::Ehr::EhrException::__write(__outS); +#endif +} + +void +Ehr::InvalidRequestException::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readString(); + } + __inS->startSlice(); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + EhrException::__read(__inS, true); +#else + ::Ehr::EhrException::__read(__inS, true); +#endif +} + +struct __F__Ehr__InvalidRequestException : public ::IceInternal::UserExceptionFactory +{ + virtual void + createAndThrow() + { + throw ::Ehr::InvalidRequestException(); + } +}; + +static ::IceInternal::UserExceptionFactoryPtr __F__Ehr__InvalidRequestException__Ptr = new __F__Ehr__InvalidRequestException; + +const ::IceInternal::UserExceptionFactoryPtr& +Ehr::InvalidRequestException::ice_factory() +{ + return __F__Ehr__InvalidRequestException__Ptr; +} + +class __F__Ehr__InvalidRequestException__Init +{ +public: + + __F__Ehr__InvalidRequestException__Init() + { + ::IceInternal::factoryTable->addExceptionFactory("::Ehr::InvalidRequestException", ::Ehr::InvalidRequestException::ice_factory()); + } + + ~__F__Ehr__InvalidRequestException__Init() + { + ::IceInternal::factoryTable->removeExceptionFactory("::Ehr::InvalidRequestException"); + } +}; + +static __F__Ehr__InvalidRequestException__Init __F__Ehr__InvalidRequestException__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__InvalidRequestException__initializer() {} } +#endif + +Ehr::InvalidAccountException::InvalidAccountException(const ::std::string& __ice_what) : +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + InvalidRequestException(__ice_what) +#else + ::Ehr::InvalidRequestException(__ice_what) +#endif +{ +} + +Ehr::InvalidAccountException::~InvalidAccountException() throw() +{ +} + +static const char* __Ehr__InvalidAccountException_name = "Ehr::InvalidAccountException"; + +::std::string +Ehr::InvalidAccountException::ice_name() const +{ + return __Ehr__InvalidAccountException_name; +} + +::Ice::Exception* +Ehr::InvalidAccountException::ice_clone() const +{ + return new InvalidAccountException(*this); +} + +void +Ehr::InvalidAccountException::ice_throw() const +{ + throw *this; +} + +void +Ehr::InvalidAccountException::__write(::IceInternal::BasicStream* __os) const +{ + __os->write(::std::string("::Ehr::InvalidAccountException"), false); + __os->startWriteSlice(); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + InvalidRequestException::__write(__os); +#else + ::Ehr::InvalidRequestException::__write(__os); +#endif +} + +void +Ehr::InvalidAccountException::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->read(myId, false); + } + __is->startReadSlice(); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + InvalidRequestException::__read(__is, true); +#else + ::Ehr::InvalidRequestException::__read(__is, true); +#endif +} + +void +Ehr::InvalidAccountException::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeString(::std::string("::Ehr::InvalidAccountException")); + __outS->startSlice(); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + InvalidRequestException::__write(__outS); +#else + ::Ehr::InvalidRequestException::__write(__outS); +#endif +} + +void +Ehr::InvalidAccountException::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readString(); + } + __inS->startSlice(); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + InvalidRequestException::__read(__inS, true); +#else + ::Ehr::InvalidRequestException::__read(__inS, true); +#endif +} + +struct __F__Ehr__InvalidAccountException : public ::IceInternal::UserExceptionFactory +{ + virtual void + createAndThrow() + { + throw ::Ehr::InvalidAccountException(); + } +}; + +static ::IceInternal::UserExceptionFactoryPtr __F__Ehr__InvalidAccountException__Ptr = new __F__Ehr__InvalidAccountException; + +const ::IceInternal::UserExceptionFactoryPtr& +Ehr::InvalidAccountException::ice_factory() +{ + return __F__Ehr__InvalidAccountException__Ptr; +} + +class __F__Ehr__InvalidAccountException__Init +{ +public: + + __F__Ehr__InvalidAccountException__Init() + { + ::IceInternal::factoryTable->addExceptionFactory("::Ehr::InvalidAccountException", ::Ehr::InvalidAccountException::ice_factory()); + } + + ~__F__Ehr__InvalidAccountException__Init() + { + ::IceInternal::factoryTable->removeExceptionFactory("::Ehr::InvalidAccountException"); + } +}; + +static __F__Ehr__InvalidAccountException__Init __F__Ehr__InvalidAccountException__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__InvalidAccountException__initializer() {} } +#endif + +Ehr::SignatureException::SignatureException(const ::std::string& __ice_what) : +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + EhrException(__ice_what) +#else + ::Ehr::EhrException(__ice_what) +#endif +{ +} + +Ehr::SignatureException::~SignatureException() throw() +{ +} + +static const char* __Ehr__SignatureException_name = "Ehr::SignatureException"; + +::std::string +Ehr::SignatureException::ice_name() const +{ + return __Ehr__SignatureException_name; +} + +::Ice::Exception* +Ehr::SignatureException::ice_clone() const +{ + return new SignatureException(*this); +} + +void +Ehr::SignatureException::ice_throw() const +{ + throw *this; +} + +void +Ehr::SignatureException::__write(::IceInternal::BasicStream* __os) const +{ + __os->write(::std::string("::Ehr::SignatureException"), false); + __os->startWriteSlice(); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + EhrException::__write(__os); +#else + ::Ehr::EhrException::__write(__os); +#endif +} + +void +Ehr::SignatureException::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->read(myId, false); + } + __is->startReadSlice(); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + EhrException::__read(__is, true); +#else + ::Ehr::EhrException::__read(__is, true); +#endif +} + +void +Ehr::SignatureException::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeString(::std::string("::Ehr::SignatureException")); + __outS->startSlice(); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + EhrException::__write(__outS); +#else + ::Ehr::EhrException::__write(__outS); +#endif +} + +void +Ehr::SignatureException::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readString(); + } + __inS->startSlice(); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + EhrException::__read(__inS, true); +#else + ::Ehr::EhrException::__read(__inS, true); +#endif +} + +struct __F__Ehr__SignatureException : public ::IceInternal::UserExceptionFactory +{ + virtual void + createAndThrow() + { + throw ::Ehr::SignatureException(); + } +}; + +static ::IceInternal::UserExceptionFactoryPtr __F__Ehr__SignatureException__Ptr = new __F__Ehr__SignatureException; + +const ::IceInternal::UserExceptionFactoryPtr& +Ehr::SignatureException::ice_factory() +{ + return __F__Ehr__SignatureException__Ptr; +} + +class __F__Ehr__SignatureException__Init +{ +public: + + __F__Ehr__SignatureException__Init() + { + ::IceInternal::factoryTable->addExceptionFactory("::Ehr::SignatureException", ::Ehr::SignatureException::ice_factory()); + } + + ~__F__Ehr__SignatureException__Init() + { + ::IceInternal::factoryTable->removeExceptionFactory("::Ehr::SignatureException"); + } +}; + +static __F__Ehr__SignatureException__Init __F__Ehr__SignatureException__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__SignatureException__initializer() {} } +#endif + +Ehr::PermissionDeniedException::PermissionDeniedException(const ::std::string& __ice_what) : +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + EhrException(__ice_what) +#else + ::Ehr::EhrException(__ice_what) +#endif +{ +} + +Ehr::PermissionDeniedException::~PermissionDeniedException() throw() +{ +} + +static const char* __Ehr__PermissionDeniedException_name = "Ehr::PermissionDeniedException"; + +::std::string +Ehr::PermissionDeniedException::ice_name() const +{ + return __Ehr__PermissionDeniedException_name; +} + +::Ice::Exception* +Ehr::PermissionDeniedException::ice_clone() const +{ + return new PermissionDeniedException(*this); +} + +void +Ehr::PermissionDeniedException::ice_throw() const +{ + throw *this; +} + +void +Ehr::PermissionDeniedException::__write(::IceInternal::BasicStream* __os) const +{ + __os->write(::std::string("::Ehr::PermissionDeniedException"), false); + __os->startWriteSlice(); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + EhrException::__write(__os); +#else + ::Ehr::EhrException::__write(__os); +#endif +} + +void +Ehr::PermissionDeniedException::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->read(myId, false); + } + __is->startReadSlice(); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + EhrException::__read(__is, true); +#else + ::Ehr::EhrException::__read(__is, true); +#endif +} + +void +Ehr::PermissionDeniedException::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeString(::std::string("::Ehr::PermissionDeniedException")); + __outS->startSlice(); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + EhrException::__write(__outS); +#else + ::Ehr::EhrException::__write(__outS); +#endif +} + +void +Ehr::PermissionDeniedException::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readString(); + } + __inS->startSlice(); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + EhrException::__read(__inS, true); +#else + ::Ehr::EhrException::__read(__inS, true); +#endif +} + +struct __F__Ehr__PermissionDeniedException : public ::IceInternal::UserExceptionFactory +{ + virtual void + createAndThrow() + { + throw ::Ehr::PermissionDeniedException(); + } +}; + +static ::IceInternal::UserExceptionFactoryPtr __F__Ehr__PermissionDeniedException__Ptr = new __F__Ehr__PermissionDeniedException; + +const ::IceInternal::UserExceptionFactoryPtr& +Ehr::PermissionDeniedException::ice_factory() +{ + return __F__Ehr__PermissionDeniedException__Ptr; +} + +class __F__Ehr__PermissionDeniedException__Init +{ +public: + + __F__Ehr__PermissionDeniedException__Init() + { + ::IceInternal::factoryTable->addExceptionFactory("::Ehr::PermissionDeniedException", ::Ehr::PermissionDeniedException::ice_factory()); + } + + ~__F__Ehr__PermissionDeniedException__Init() + { + ::IceInternal::factoryTable->removeExceptionFactory("::Ehr::PermissionDeniedException"); + } +}; + +static __F__Ehr__PermissionDeniedException__Init __F__Ehr__PermissionDeniedException__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__PermissionDeniedException__initializer() {} } +#endif + +bool +Ehr::AccountIdentifier::operator==(const AccountIdentifier& __rhs) const +{ + if(this == &__rhs) + { + return true; + } + if(user != __rhs.user) + { + return false; + } + if(provider != __rhs.provider) + { + return false; + } + return true; +} + +bool +Ehr::AccountIdentifier::operator<(const AccountIdentifier& __rhs) const +{ + if(this == &__rhs) + { + return false; + } + if(user < __rhs.user) + { + return true; + } + else if(__rhs.user < user) + { + return false; + } + if(provider < __rhs.provider) + { + return true; + } + else if(__rhs.provider < provider) + { + return false; + } + return false; +} + +void +Ehr::AccountIdentifier::__write(::IceInternal::BasicStream* __os) const +{ + __os->write(user); + __os->write(provider); +} + +void +Ehr::AccountIdentifier::__read(::IceInternal::BasicStream* __is) +{ + __is->read(user); + __is->read(provider); +} + +void +Ehr::AccountIdentifier::ice_write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeString(user); + __outS->writeString(provider); +} + +void +Ehr::AccountIdentifier::ice_read(const ::Ice::InputStreamPtr& __inS) +{ + user = __inS->readString(); + provider = __inS->readString(); +} + +void +Ehr::ice_writeAccountIdentifier(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::AccountIdentifier& __v) +{ + __v.ice_write(__outS); +} + +void +Ehr::ice_readAccountIdentifier(const ::Ice::InputStreamPtr& __inS, ::Ehr::AccountIdentifier& __v) +{ + __v.ice_read(__inS); +} + +void +Ehr::__write(::IceInternal::BasicStream* __os, ::Ehr::DocumentType v) +{ + __os->write(static_cast< ::Ice::Byte>(v), 3); +} + +void +Ehr::__read(::IceInternal::BasicStream* __is, ::Ehr::DocumentType& v) +{ + ::Ice::Byte val; + __is->read(val, 3); + v = static_cast< ::Ehr::DocumentType>(val); +} + +void +Ehr::ice_writeDocumentType(const ::Ice::OutputStreamPtr& __outS, ::Ehr::DocumentType v) +{ + if(static_cast(v) >= 3) + { + throw ::Ice::MarshalException(__FILE__, __LINE__, "enumerator out of range"); + } + __outS->writeByte(static_cast< ::Ice::Byte>(v)); +} + +void +Ehr::ice_readDocumentType(const ::Ice::InputStreamPtr& __inS, ::Ehr::DocumentType& v) +{ + ::Ice::Byte val = __inS->readByte(); + if(val > 3) + { + throw ::Ice::MarshalException(__FILE__, __LINE__, "enumerator out of range"); + } + v = static_cast< ::Ehr::DocumentType>(val); +} + +bool +Ehr::Signature::operator==(const Signature& __rhs) const +{ + if(this == &__rhs) + { + return true; + } + if(data != __rhs.data) + { + return false; + } + return true; +} + +bool +Ehr::Signature::operator<(const Signature& __rhs) const +{ + if(this == &__rhs) + { + return false; + } + if(data < __rhs.data) + { + return true; + } + else if(__rhs.data < data) + { + return false; + } + return false; +} + +void +Ehr::Signature::__write(::IceInternal::BasicStream* __os) const +{ + if(data.size() == 0) + { + __os->writeSize(0); + } + else + { + __os->write(&data[0], &data[0] + data.size()); + } +} + +void +Ehr::Signature::__read(::IceInternal::BasicStream* __is) +{ + ::std::pair ___data; + __is->read(___data); + ::std::vector< ::Ice::Byte>(___data.first, ___data.second).swap(data); +} + +void +Ehr::Signature::ice_write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeByteSeq(data); +} + +void +Ehr::Signature::ice_read(const ::Ice::InputStreamPtr& __inS) +{ + data = __inS->readByteSeq(); +} + +void +Ehr::ice_writeSignature(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::Signature& __v) +{ + __v.ice_write(__outS); +} + +void +Ehr::ice_readSignature(const ::Ice::InputStreamPtr& __inS, ::Ehr::Signature& __v) +{ + __v.ice_read(__inS); +} + +bool +Ehr::Timestamp::operator==(const Timestamp& __rhs) const +{ + if(this == &__rhs) + { + return true; + } + if(msecs != __rhs.msecs) + { + return false; + } + return true; +} + +bool +Ehr::Timestamp::operator<(const Timestamp& __rhs) const +{ + if(this == &__rhs) + { + return false; + } + if(msecs < __rhs.msecs) + { + return true; + } + else if(__rhs.msecs < msecs) + { + return false; + } + return false; +} + +void +Ehr::Timestamp::__write(::IceInternal::BasicStream* __os) const +{ + __os->write(msecs); +} + +void +Ehr::Timestamp::__read(::IceInternal::BasicStream* __is) +{ + __is->read(msecs); +} + +void +Ehr::Timestamp::ice_write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeLong(msecs); +} + +void +Ehr::Timestamp::ice_read(const ::Ice::InputStreamPtr& __inS) +{ + msecs = __inS->readLong(); +} + +void +Ehr::ice_writeTimestamp(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::Timestamp& __v) +{ + __v.ice_write(__outS); +} + +void +Ehr::ice_readTimestamp(const ::Ice::InputStreamPtr& __inS, ::Ehr::Timestamp& __v) +{ + __v.ice_read(__inS); +} + +bool +Ehr::Date::operator==(const Date& __rhs) const +{ + if(this == &__rhs) + { + return true; + } + if(day != __rhs.day) + { + return false; + } + if(month != __rhs.month) + { + return false; + } + if(year != __rhs.year) + { + return false; + } + return true; +} + +bool +Ehr::Date::operator<(const Date& __rhs) const +{ + if(this == &__rhs) + { + return false; + } + if(day < __rhs.day) + { + return true; + } + else if(__rhs.day < day) + { + return false; + } + if(month < __rhs.month) + { + return true; + } + else if(__rhs.month < month) + { + return false; + } + if(year < __rhs.year) + { + return true; + } + else if(__rhs.year < year) + { + return false; + } + return false; +} + +void +Ehr::Date::__write(::IceInternal::BasicStream* __os) const +{ + __os->write(day); + __os->write(month); + __os->write(year); +} + +void +Ehr::Date::__read(::IceInternal::BasicStream* __is) +{ + __is->read(day); + __is->read(month); + __is->read(year); +} + +void +Ehr::Date::ice_write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeByte(day); + __outS->writeByte(month); + __outS->writeShort(year); +} + +void +Ehr::Date::ice_read(const ::Ice::InputStreamPtr& __inS) +{ + day = __inS->readByte(); + month = __inS->readByte(); + year = __inS->readShort(); +} + +void +Ehr::ice_writeDate(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::Date& __v) +{ + __v.ice_write(__outS); +} + +void +Ehr::ice_readDate(const ::Ice::InputStreamPtr& __inS, ::Ehr::Date& __v) +{ + __v.ice_read(__inS); +} + +void +Ehr::__write(::IceInternal::BasicStream* __os, ::Ehr::AccessType v) +{ + __os->write(static_cast< ::Ice::Byte>(v), 2); +} + +void +Ehr::__read(::IceInternal::BasicStream* __is, ::Ehr::AccessType& v) +{ + ::Ice::Byte val; + __is->read(val, 2); + v = static_cast< ::Ehr::AccessType>(val); +} + +void +Ehr::ice_writeAccessType(const ::Ice::OutputStreamPtr& __outS, ::Ehr::AccessType v) +{ + if(static_cast(v) >= 2) + { + throw ::Ice::MarshalException(__FILE__, __LINE__, "enumerator out of range"); + } + __outS->writeByte(static_cast< ::Ice::Byte>(v)); +} + +void +Ehr::ice_readAccessType(const ::Ice::InputStreamPtr& __inS, ::Ehr::AccessType& v) +{ + ::Ice::Byte val = __inS->readByte(); + if(val > 2) + { + throw ::Ice::MarshalException(__FILE__, __LINE__, "enumerator out of range"); + } + v = static_cast< ::Ehr::AccessType>(val); +} + +bool +Ehr::EncryptedDocument::operator==(const EncryptedDocument& __rhs) const +{ + if(this == &__rhs) + { + return true; + } + if(encryptedKey != __rhs.encryptedKey) + { + return false; + } + if(initialVector != __rhs.initialVector) + { + return false; + } + if(encryptedData != __rhs.encryptedData) + { + return false; + } + return true; +} + +bool +Ehr::EncryptedDocument::operator<(const EncryptedDocument& __rhs) const +{ + if(this == &__rhs) + { + return false; + } + if(encryptedKey < __rhs.encryptedKey) + { + return true; + } + else if(__rhs.encryptedKey < encryptedKey) + { + return false; + } + if(initialVector < __rhs.initialVector) + { + return true; + } + else if(__rhs.initialVector < initialVector) + { + return false; + } + if(encryptedData < __rhs.encryptedData) + { + return true; + } + else if(__rhs.encryptedData < encryptedData) + { + return false; + } + return false; +} + +void +Ehr::EncryptedDocument::__write(::IceInternal::BasicStream* __os) const +{ + if(encryptedKey.size() == 0) + { + __os->writeSize(0); + } + else + { + __os->write(&encryptedKey[0], &encryptedKey[0] + encryptedKey.size()); + } + if(initialVector.size() == 0) + { + __os->writeSize(0); + } + else + { + __os->write(&initialVector[0], &initialVector[0] + initialVector.size()); + } + if(encryptedData.size() == 0) + { + __os->writeSize(0); + } + else + { + __os->write(&encryptedData[0], &encryptedData[0] + encryptedData.size()); + } +} + +void +Ehr::EncryptedDocument::__read(::IceInternal::BasicStream* __is) +{ + ::std::pair ___encryptedKey; + __is->read(___encryptedKey); + ::std::vector< ::Ice::Byte>(___encryptedKey.first, ___encryptedKey.second).swap(encryptedKey); + ::std::pair ___initialVector; + __is->read(___initialVector); + ::std::vector< ::Ice::Byte>(___initialVector.first, ___initialVector.second).swap(initialVector); + ::std::pair ___encryptedData; + __is->read(___encryptedData); + ::std::vector< ::Ice::Byte>(___encryptedData.first, ___encryptedData.second).swap(encryptedData); +} + +void +Ehr::EncryptedDocument::ice_write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeByteSeq(encryptedKey); + __outS->writeByteSeq(initialVector); + __outS->writeByteSeq(encryptedData); +} + +void +Ehr::EncryptedDocument::ice_read(const ::Ice::InputStreamPtr& __inS) +{ + encryptedKey = __inS->readByteSeq(); + initialVector = __inS->readByteSeq(); + encryptedData = __inS->readByteSeq(); +} + +void +Ehr::ice_writeEncryptedDocument(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::EncryptedDocument& __v) +{ + __v.ice_write(__outS); +} + +void +Ehr::ice_readEncryptedDocument(const ::Ice::InputStreamPtr& __inS, ::Ehr::EncryptedDocument& __v) +{ + __v.ice_read(__inS); +} + +bool +Ehr::DocumentListItem::operator==(const DocumentListItem& __rhs) const +{ + if(this == &__rhs) + { + return true; + } + if(id != __rhs.id) + { + return false; + } + if(created != __rhs.created) + { + return false; + } + if(document != __rhs.document) + { + return false; + } + return true; +} + +bool +Ehr::DocumentListItem::operator<(const DocumentListItem& __rhs) const +{ + if(this == &__rhs) + { + return false; + } + if(id < __rhs.id) + { + return true; + } + else if(__rhs.id < id) + { + return false; + } + if(created < __rhs.created) + { + return true; + } + else if(__rhs.created < created) + { + return false; + } + if(document < __rhs.document) + { + return true; + } + else if(__rhs.document < document) + { + return false; + } + return false; +} + +void +Ehr::DocumentListItem::__write(::IceInternal::BasicStream* __os) const +{ + __os->write(id); + created.__write(__os); + document.__write(__os); +} + +void +Ehr::DocumentListItem::__read(::IceInternal::BasicStream* __is) +{ + __is->read(id); + created.__read(__is); + document.__read(__is); +} + +void +Ehr::DocumentListItem::ice_write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeLong(id); + ::Ehr::ice_writeTimestamp(__outS, created); + ::Ehr::ice_writeEncryptedDocument(__outS, document); +} + +void +Ehr::DocumentListItem::ice_read(const ::Ice::InputStreamPtr& __inS) +{ + id = __inS->readLong(); + ::Ehr::ice_readTimestamp(__inS, created); + ::Ehr::ice_readEncryptedDocument(__inS, document); +} + +void +Ehr::ice_writeDocumentListItem(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::DocumentListItem& __v) +{ + __v.ice_write(__outS); +} + +void +Ehr::ice_readDocumentListItem(const ::Ice::InputStreamPtr& __inS, ::Ehr::DocumentListItem& __v) +{ + __v.ice_read(__inS); +} + +void +Ehr::__writeDocumentList(::IceInternal::BasicStream* __os, const ::Ehr::DocumentListItem* begin, const ::Ehr::DocumentListItem* end) +{ + ::Ice::Int size = static_cast< ::Ice::Int>(end - begin); + __os->writeSize(size); + for(int i = 0; i < size; ++i) + { + begin[i].__write(__os); + } +} + +void +Ehr::__readDocumentList(::IceInternal::BasicStream* __is, ::Ehr::DocumentList& v) +{ + ::Ice::Int sz; + __is->readSize(sz); + __is->startSeq(sz, 19); + v.resize(sz); + for(int i = 0; i < sz; ++i) + { + v[i].__read(__is); + __is->checkSeq(); + __is->endElement(); + } + __is->endSeq(sz); +} + +void +Ehr::ice_writeDocumentList(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::DocumentList& v) +{ + __outS->writeSize(::Ice::Int(v.size())); + ::Ehr::DocumentList::const_iterator p; + for(p = v.begin(); p != v.end(); ++p) + { + ::Ehr::ice_writeDocumentListItem(__outS, (*p)); + } +} + +void +Ehr::ice_readDocumentList(const ::Ice::InputStreamPtr& __inS, ::Ehr::DocumentList& v) +{ + ::Ice::Int sz = __inS->readSize(); + v.resize(sz); + for(int i = 0; i < sz; ++i) + { + ::Ehr::ice_readDocumentListItem(__inS, v[i]); + } +} + +bool +Ehr::AccessControlListItem::operator==(const AccessControlListItem& __rhs) const +{ + if(this == &__rhs) + { + return true; + } + if(id != __rhs.id) + { + return false; + } + if(account != __rhs.account) + { + return false; + } + if(access != __rhs.access) + { + return false; + } + return true; +} + +bool +Ehr::AccessControlListItem::operator<(const AccessControlListItem& __rhs) const +{ + if(this == &__rhs) + { + return false; + } + if(id < __rhs.id) + { + return true; + } + else if(__rhs.id < id) + { + return false; + } + if(account < __rhs.account) + { + return true; + } + else if(__rhs.account < account) + { + return false; + } + if(access < __rhs.access) + { + return true; + } + else if(__rhs.access < access) + { + return false; + } + return false; +} + +void +Ehr::AccessControlListItem::__write(::IceInternal::BasicStream* __os) const +{ + __os->write(id); + account.__write(__os); + ::Ehr::__write(__os, access); +} + +void +Ehr::AccessControlListItem::__read(::IceInternal::BasicStream* __is) +{ + __is->read(id); + account.__read(__is); + ::Ehr::__read(__is, access); +} + +void +Ehr::AccessControlListItem::ice_write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeLong(id); + ::Ehr::ice_writeAccountIdentifier(__outS, account); + ::Ehr::ice_writeAccessType(__outS, access); +} + +void +Ehr::AccessControlListItem::ice_read(const ::Ice::InputStreamPtr& __inS) +{ + id = __inS->readLong(); + ::Ehr::ice_readAccountIdentifier(__inS, account); + ::Ehr::ice_readAccessType(__inS, access); +} + +void +Ehr::ice_writeAccessControlListItem(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::AccessControlListItem& __v) +{ + __v.ice_write(__outS); +} + +void +Ehr::ice_readAccessControlListItem(const ::Ice::InputStreamPtr& __inS, ::Ehr::AccessControlListItem& __v) +{ + __v.ice_read(__inS); +} + +void +Ehr::__writeAccessControlList(::IceInternal::BasicStream* __os, const ::Ehr::AccessControlListItem* begin, const ::Ehr::AccessControlListItem* end) +{ + ::Ice::Int size = static_cast< ::Ice::Int>(end - begin); + __os->writeSize(size); + for(int i = 0; i < size; ++i) + { + begin[i].__write(__os); + } +} + +void +Ehr::__readAccessControlList(::IceInternal::BasicStream* __is, ::Ehr::AccessControlList& v) +{ + ::Ice::Int sz; + __is->readSize(sz); + __is->startSeq(sz, 11); + v.resize(sz); + for(int i = 0; i < sz; ++i) + { + v[i].__read(__is); + __is->checkSeq(); + __is->endElement(); + } + __is->endSeq(sz); +} + +void +Ehr::ice_writeAccessControlList(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::AccessControlList& v) +{ + __outS->writeSize(::Ice::Int(v.size())); + ::Ehr::AccessControlList::const_iterator p; + for(p = v.begin(); p != v.end(); ++p) + { + ::Ehr::ice_writeAccessControlListItem(__outS, (*p)); + } +} + +void +Ehr::ice_readAccessControlList(const ::Ice::InputStreamPtr& __inS, ::Ehr::AccessControlList& v) +{ + ::Ice::Int sz = __inS->readSize(); + v.resize(sz); + for(int i = 0; i < sz; ++i) + { + ::Ehr::ice_readAccessControlListItem(__inS, v[i]); + } +} + +bool +Ehr::Permissions::operator==(const Permissions& __rhs) const +{ + if(this == &__rhs) + { + return true; + } + if(defaultAccess != __rhs.defaultAccess) + { + return false; + } + if(acl != __rhs.acl) + { + return false; + } + return true; +} + +bool +Ehr::Permissions::operator<(const Permissions& __rhs) const +{ + if(this == &__rhs) + { + return false; + } + if(defaultAccess < __rhs.defaultAccess) + { + return true; + } + else if(__rhs.defaultAccess < defaultAccess) + { + return false; + } + if(acl < __rhs.acl) + { + return true; + } + else if(__rhs.acl < acl) + { + return false; + } + return false; +} + +void +Ehr::Permissions::__write(::IceInternal::BasicStream* __os) const +{ + ::Ehr::__write(__os, defaultAccess); + if(acl.size() == 0) + { + __os->writeSize(0); + } + else + { + ::Ehr::__writeAccessControlList(__os, &acl[0], &acl[0] + acl.size()); + } +} + +void +Ehr::Permissions::__read(::IceInternal::BasicStream* __is) +{ + ::Ehr::__read(__is, defaultAccess); + ::Ehr::__readAccessControlList(__is, acl); +} + +void +Ehr::Permissions::ice_write(const ::Ice::OutputStreamPtr& __outS) const +{ + ::Ehr::ice_writeAccessType(__outS, defaultAccess); + ::Ehr::ice_writeAccessControlList(__outS, acl); +} + +void +Ehr::Permissions::ice_read(const ::Ice::InputStreamPtr& __inS) +{ + ::Ehr::ice_readAccessType(__inS, defaultAccess); + ::Ehr::ice_readAccessControlList(__inS, acl); +} + +void +Ehr::ice_writePermissions(const ::Ice::OutputStreamPtr& __outS, const ::Ehr::Permissions& __v) +{ + __v.ice_write(__outS); +} + +void +Ehr::ice_readPermissions(const ::Ice::InputStreamPtr& __inS, ::Ehr::Permissions& __v) +{ + __v.ice_read(__inS); +} + +const ::std::string& +IceProxy::Ehr::Document::ice_staticId() +{ + return ::Ehr::Document::ice_staticId(); +} + +::IceInternal::Handle< ::IceDelegateM::Ice::Object> +IceProxy::Ehr::Document::__createDelegateM() +{ + return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::Ehr::Document); +} + +::IceInternal::Handle< ::IceDelegateD::Ice::Object> +IceProxy::Ehr::Document::__createDelegateD() +{ + return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Ehr::Document); +} + +::IceProxy::Ice::Object* +IceProxy::Ehr::Document::__newInstance() const +{ + return new Document; +} + +const ::std::string& +IceProxy::Ehr::Prescription::ice_staticId() +{ + return ::Ehr::Prescription::ice_staticId(); +} + +::IceInternal::Handle< ::IceDelegateM::Ice::Object> +IceProxy::Ehr::Prescription::__createDelegateM() +{ + return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::Ehr::Prescription); +} + +::IceInternal::Handle< ::IceDelegateD::Ice::Object> +IceProxy::Ehr::Prescription::__createDelegateD() +{ + return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Ehr::Prescription); +} + +::IceProxy::Ice::Object* +IceProxy::Ehr::Prescription::__newInstance() const +{ + return new Prescription; +} + +const ::std::string& +IceProxy::Ehr::ConsumedPrescription::ice_staticId() +{ + return ::Ehr::ConsumedPrescription::ice_staticId(); +} + +::IceInternal::Handle< ::IceDelegateM::Ice::Object> +IceProxy::Ehr::ConsumedPrescription::__createDelegateM() +{ + return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::Ehr::ConsumedPrescription); +} + +::IceInternal::Handle< ::IceDelegateD::Ice::Object> +IceProxy::Ehr::ConsumedPrescription::__createDelegateD() +{ + return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Ehr::ConsumedPrescription); +} + +::IceProxy::Ice::Object* +IceProxy::Ehr::ConsumedPrescription::__newInstance() const +{ + return new ConsumedPrescription; +} + +const ::std::string& +IceProxy::Ehr::Request::ice_staticId() +{ + return ::Ehr::Request::ice_staticId(); +} + +::IceInternal::Handle< ::IceDelegateM::Ice::Object> +IceProxy::Ehr::Request::__createDelegateM() +{ + return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::Ehr::Request); +} + +::IceInternal::Handle< ::IceDelegateD::Ice::Object> +IceProxy::Ehr::Request::__createDelegateD() +{ + return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Ehr::Request); +} + +::IceProxy::Ice::Object* +IceProxy::Ehr::Request::__newInstance() const +{ + return new Request; +} + +const ::std::string& +IceProxy::Ehr::ThirdPartyRequest::ice_staticId() +{ + return ::Ehr::ThirdPartyRequest::ice_staticId(); +} + +::IceInternal::Handle< ::IceDelegateM::Ice::Object> +IceProxy::Ehr::ThirdPartyRequest::__createDelegateM() +{ + return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::Ehr::ThirdPartyRequest); +} + +::IceInternal::Handle< ::IceDelegateD::Ice::Object> +IceProxy::Ehr::ThirdPartyRequest::__createDelegateD() +{ + return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Ehr::ThirdPartyRequest); +} + +::IceProxy::Ice::Object* +IceProxy::Ehr::ThirdPartyRequest::__newInstance() const +{ + return new ThirdPartyRequest; +} + +const ::std::string& +IceProxy::Ehr::CreatePrescriptionRequest::ice_staticId() +{ + return ::Ehr::CreatePrescriptionRequest::ice_staticId(); +} + +::IceInternal::Handle< ::IceDelegateM::Ice::Object> +IceProxy::Ehr::CreatePrescriptionRequest::__createDelegateM() +{ + return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::Ehr::CreatePrescriptionRequest); +} + +::IceInternal::Handle< ::IceDelegateD::Ice::Object> +IceProxy::Ehr::CreatePrescriptionRequest::__createDelegateD() +{ + return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Ehr::CreatePrescriptionRequest); +} + +::IceProxy::Ice::Object* +IceProxy::Ehr::CreatePrescriptionRequest::__newInstance() const +{ + return new CreatePrescriptionRequest; +} + +const ::std::string& +IceProxy::Ehr::ConsumePrescriptionRequest::ice_staticId() +{ + return ::Ehr::ConsumePrescriptionRequest::ice_staticId(); +} + +::IceInternal::Handle< ::IceDelegateM::Ice::Object> +IceProxy::Ehr::ConsumePrescriptionRequest::__createDelegateM() +{ + return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::Ehr::ConsumePrescriptionRequest); +} + +::IceInternal::Handle< ::IceDelegateD::Ice::Object> +IceProxy::Ehr::ConsumePrescriptionRequest::__createDelegateD() +{ + return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Ehr::ConsumePrescriptionRequest); +} + +::IceProxy::Ice::Object* +IceProxy::Ehr::ConsumePrescriptionRequest::__newInstance() const +{ + return new ConsumePrescriptionRequest; +} + +const ::std::string& +IceProxy::Ehr::ListDocumentsRequest::ice_staticId() +{ + return ::Ehr::ListDocumentsRequest::ice_staticId(); +} + +::IceInternal::Handle< ::IceDelegateM::Ice::Object> +IceProxy::Ehr::ListDocumentsRequest::__createDelegateM() +{ + return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::Ehr::ListDocumentsRequest); +} + +::IceInternal::Handle< ::IceDelegateD::Ice::Object> +IceProxy::Ehr::ListDocumentsRequest::__createDelegateD() +{ + return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Ehr::ListDocumentsRequest); +} + +::IceProxy::Ice::Object* +IceProxy::Ehr::ListDocumentsRequest::__newInstance() const +{ + return new ListDocumentsRequest; +} + +const ::std::string& +IceProxy::Ehr::FindDocumentsRequest::ice_staticId() +{ + return ::Ehr::FindDocumentsRequest::ice_staticId(); +} + +::IceInternal::Handle< ::IceDelegateM::Ice::Object> +IceProxy::Ehr::FindDocumentsRequest::__createDelegateM() +{ + return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::Ehr::FindDocumentsRequest); +} + +::IceInternal::Handle< ::IceDelegateD::Ice::Object> +IceProxy::Ehr::FindDocumentsRequest::__createDelegateD() +{ + return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Ehr::FindDocumentsRequest); +} + +::IceProxy::Ice::Object* +IceProxy::Ehr::FindDocumentsRequest::__newInstance() const +{ + return new FindDocumentsRequest; +} + +const ::std::string& +IceProxy::Ehr::CreatePermissionRequest::ice_staticId() +{ + return ::Ehr::CreatePermissionRequest::ice_staticId(); +} + +::IceInternal::Handle< ::IceDelegateM::Ice::Object> +IceProxy::Ehr::CreatePermissionRequest::__createDelegateM() +{ + return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::Ehr::CreatePermissionRequest); +} + +::IceInternal::Handle< ::IceDelegateD::Ice::Object> +IceProxy::Ehr::CreatePermissionRequest::__createDelegateD() +{ + return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Ehr::CreatePermissionRequest); +} + +::IceProxy::Ice::Object* +IceProxy::Ehr::CreatePermissionRequest::__newInstance() const +{ + return new CreatePermissionRequest; +} + +const ::std::string& +IceProxy::Ehr::SetDefaultAccessRequest::ice_staticId() +{ + return ::Ehr::SetDefaultAccessRequest::ice_staticId(); +} + +::IceInternal::Handle< ::IceDelegateM::Ice::Object> +IceProxy::Ehr::SetDefaultAccessRequest::__createDelegateM() +{ + return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::Ehr::SetDefaultAccessRequest); +} + +::IceInternal::Handle< ::IceDelegateD::Ice::Object> +IceProxy::Ehr::SetDefaultAccessRequest::__createDelegateD() +{ + return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Ehr::SetDefaultAccessRequest); +} + +::IceProxy::Ice::Object* +IceProxy::Ehr::SetDefaultAccessRequest::__newInstance() const +{ + return new SetDefaultAccessRequest; +} + +const ::std::string& +IceProxy::Ehr::ListPermissionsRequest::ice_staticId() +{ + return ::Ehr::ListPermissionsRequest::ice_staticId(); +} + +::IceInternal::Handle< ::IceDelegateM::Ice::Object> +IceProxy::Ehr::ListPermissionsRequest::__createDelegateM() +{ + return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::Ehr::ListPermissionsRequest); +} + +::IceInternal::Handle< ::IceDelegateD::Ice::Object> +IceProxy::Ehr::ListPermissionsRequest::__createDelegateD() +{ + return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Ehr::ListPermissionsRequest); +} + +::IceProxy::Ice::Object* +IceProxy::Ehr::ListPermissionsRequest::__newInstance() const +{ + return new ListPermissionsRequest; +} + +const ::std::string& +IceProxy::Ehr::RemovePermissionRequest::ice_staticId() +{ + return ::Ehr::RemovePermissionRequest::ice_staticId(); +} + +::IceInternal::Handle< ::IceDelegateM::Ice::Object> +IceProxy::Ehr::RemovePermissionRequest::__createDelegateM() +{ + return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::Ehr::RemovePermissionRequest); +} + +::IceInternal::Handle< ::IceDelegateD::Ice::Object> +IceProxy::Ehr::RemovePermissionRequest::__createDelegateD() +{ + return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Ehr::RemovePermissionRequest); +} + +::IceProxy::Ice::Object* +IceProxy::Ehr::RemovePermissionRequest::__newInstance() const +{ + return new RemovePermissionRequest; +} + +void +IceProxy::Ehr::Provider::createPrescription(const ::Ehr::CreatePrescriptionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Context* __ctx) +{ + int __cnt = 0; + while(true) + { + ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; + try + { +#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug + IceUtil::DummyBCC dummy; +#endif + __checkTwowayOnly(__Ehr__Provider__createPrescription_name); + __delBase = __getDelegate(false); + ::IceDelegate::Ehr::Provider* __del = dynamic_cast< ::IceDelegate::Ehr::Provider*>(__delBase.get()); + __del->createPrescription(request, requestorSignature, ownerSignature, __ctx); + return; + } + catch(const ::IceInternal::LocalExceptionWrapper& __ex) + { + __handleExceptionWrapper(__delBase, __ex, 0); + } + catch(const ::Ice::LocalException& __ex) + { + __handleException(__delBase, __ex, 0, __cnt); + } + } +} + +void +IceProxy::Ehr::Provider::consumePrescription(const ::Ehr::ConsumePrescriptionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Context* __ctx) +{ + int __cnt = 0; + while(true) + { + ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; + try + { +#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug + IceUtil::DummyBCC dummy; +#endif + __checkTwowayOnly(__Ehr__Provider__consumePrescription_name); + __delBase = __getDelegate(false); + ::IceDelegate::Ehr::Provider* __del = dynamic_cast< ::IceDelegate::Ehr::Provider*>(__delBase.get()); + __del->consumePrescription(request, requestorSignature, ownerSignature, __ctx); + return; + } + catch(const ::IceInternal::LocalExceptionWrapper& __ex) + { + __handleExceptionWrapper(__delBase, __ex, 0); + } + catch(const ::Ice::LocalException& __ex) + { + __handleException(__delBase, __ex, 0, __cnt); + } + } +} + +::Ehr::DocumentList +IceProxy::Ehr::Provider::listDocuments(const ::Ehr::ListDocumentsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Context* __ctx) +{ + int __cnt = 0; + while(true) + { + ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; + try + { +#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug + IceUtil::DummyBCC dummy; +#endif + __checkTwowayOnly(__Ehr__Provider__listDocuments_name); + __delBase = __getDelegate(false); + ::IceDelegate::Ehr::Provider* __del = dynamic_cast< ::IceDelegate::Ehr::Provider*>(__delBase.get()); + return __del->listDocuments(request, requestorSignature, ownerSignature, __ctx); + } + catch(const ::IceInternal::LocalExceptionWrapper& __ex) + { + __handleExceptionWrapper(__delBase, __ex, 0); + } + catch(const ::Ice::LocalException& __ex) + { + __handleException(__delBase, __ex, 0, __cnt); + } + } +} + +::Ehr::DocumentList +IceProxy::Ehr::Provider::findDocuments(const ::Ehr::FindDocumentsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Context* __ctx) +{ + int __cnt = 0; + while(true) + { + ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; + try + { +#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug + IceUtil::DummyBCC dummy; +#endif + __checkTwowayOnly(__Ehr__Provider__findDocuments_name); + __delBase = __getDelegate(false); + ::IceDelegate::Ehr::Provider* __del = dynamic_cast< ::IceDelegate::Ehr::Provider*>(__delBase.get()); + return __del->findDocuments(request, requestorSignature, ownerSignature, __ctx); + } + catch(const ::IceInternal::LocalExceptionWrapper& __ex) + { + __handleExceptionWrapper(__delBase, __ex, 0); + } + catch(const ::Ice::LocalException& __ex) + { + __handleException(__delBase, __ex, 0, __cnt); + } + } +} + +void +IceProxy::Ehr::Provider::setDefaultAccess(const ::Ehr::SetDefaultAccessRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Context* __ctx) +{ + int __cnt = 0; + while(true) + { + ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; + try + { +#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug + IceUtil::DummyBCC dummy; +#endif + __checkTwowayOnly(__Ehr__Provider__setDefaultAccess_name); + __delBase = __getDelegate(false); + ::IceDelegate::Ehr::Provider* __del = dynamic_cast< ::IceDelegate::Ehr::Provider*>(__delBase.get()); + __del->setDefaultAccess(request, requestorSignature, __ctx); + return; + } + catch(const ::IceInternal::LocalExceptionWrapper& __ex) + { + __handleExceptionWrapper(__delBase, __ex, 0); + } + catch(const ::Ice::LocalException& __ex) + { + __handleException(__delBase, __ex, 0, __cnt); + } + } +} + +void +IceProxy::Ehr::Provider::createPermission(const ::Ehr::CreatePermissionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Context* __ctx) +{ + int __cnt = 0; + while(true) + { + ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; + try + { +#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug + IceUtil::DummyBCC dummy; +#endif + __checkTwowayOnly(__Ehr__Provider__createPermission_name); + __delBase = __getDelegate(false); + ::IceDelegate::Ehr::Provider* __del = dynamic_cast< ::IceDelegate::Ehr::Provider*>(__delBase.get()); + __del->createPermission(request, requestorSignature, __ctx); + return; + } + catch(const ::IceInternal::LocalExceptionWrapper& __ex) + { + __handleExceptionWrapper(__delBase, __ex, 0); + } + catch(const ::Ice::LocalException& __ex) + { + __handleException(__delBase, __ex, 0, __cnt); + } + } +} + +::Ehr::Permissions +IceProxy::Ehr::Provider::listPermissions(const ::Ehr::ListPermissionsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Context* __ctx) +{ + int __cnt = 0; + while(true) + { + ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; + try + { +#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug + IceUtil::DummyBCC dummy; +#endif + __checkTwowayOnly(__Ehr__Provider__listPermissions_name); + __delBase = __getDelegate(false); + ::IceDelegate::Ehr::Provider* __del = dynamic_cast< ::IceDelegate::Ehr::Provider*>(__delBase.get()); + return __del->listPermissions(request, requestorSignature, __ctx); + } + catch(const ::IceInternal::LocalExceptionWrapper& __ex) + { + __handleExceptionWrapper(__delBase, __ex, 0); + } + catch(const ::Ice::LocalException& __ex) + { + __handleException(__delBase, __ex, 0, __cnt); + } + } +} + +void +IceProxy::Ehr::Provider::removePermission(const ::Ehr::RemovePermissionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Context* __ctx) +{ + int __cnt = 0; + while(true) + { + ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase; + try + { +#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug + IceUtil::DummyBCC dummy; +#endif + __checkTwowayOnly(__Ehr__Provider__removePermission_name); + __delBase = __getDelegate(false); + ::IceDelegate::Ehr::Provider* __del = dynamic_cast< ::IceDelegate::Ehr::Provider*>(__delBase.get()); + __del->removePermission(request, requestorSignature, __ctx); + return; + } + catch(const ::IceInternal::LocalExceptionWrapper& __ex) + { + __handleExceptionWrapper(__delBase, __ex, 0); + } + catch(const ::Ice::LocalException& __ex) + { + __handleException(__delBase, __ex, 0, __cnt); + } + } +} + +const ::std::string& +IceProxy::Ehr::Provider::ice_staticId() +{ + return ::Ehr::Provider::ice_staticId(); +} + +::IceInternal::Handle< ::IceDelegateM::Ice::Object> +IceProxy::Ehr::Provider::__createDelegateM() +{ + return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::Ehr::Provider); +} + +::IceInternal::Handle< ::IceDelegateD::Ice::Object> +IceProxy::Ehr::Provider::__createDelegateD() +{ + return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Ehr::Provider); +} + +::IceProxy::Ice::Object* +IceProxy::Ehr::Provider::__newInstance() const +{ + return new Provider; +} + +void +IceDelegateM::Ehr::Provider::createPrescription(const ::Ehr::CreatePrescriptionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Context* __context) +{ + ::IceInternal::Outgoing __og(__handler.get(), __Ehr__Provider__createPrescription_name, ::Ice::Normal, __context); + try + { + ::IceInternal::BasicStream* __os = __og.os(); + __os->write(::Ice::ObjectPtr(::IceInternal::upCast(request.get()))); + requestorSignature.__write(__os); + ownerSignature.__write(__os); + __os->writePendingObjects(); + } + catch(const ::Ice::LocalException& __ex) + { + __og.abort(__ex); + } + bool __ok = __og.invoke(); + try + { + if(!__ok) + { + try + { + __og.throwUserException(); + } + catch(const ::Ehr::EhrException&) + { + throw; + } + catch(const ::Ice::UserException& __ex) + { + ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); + throw __uue; + } + } + __og.is()->skipEmptyEncaps(); + } + catch(const ::Ice::LocalException& __ex) + { + throw ::IceInternal::LocalExceptionWrapper(__ex, false); + } +} + +void +IceDelegateM::Ehr::Provider::consumePrescription(const ::Ehr::ConsumePrescriptionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Context* __context) +{ + ::IceInternal::Outgoing __og(__handler.get(), __Ehr__Provider__consumePrescription_name, ::Ice::Normal, __context); + try + { + ::IceInternal::BasicStream* __os = __og.os(); + __os->write(::Ice::ObjectPtr(::IceInternal::upCast(request.get()))); + requestorSignature.__write(__os); + ownerSignature.__write(__os); + __os->writePendingObjects(); + } + catch(const ::Ice::LocalException& __ex) + { + __og.abort(__ex); + } + bool __ok = __og.invoke(); + try + { + if(!__ok) + { + try + { + __og.throwUserException(); + } + catch(const ::Ehr::EhrException&) + { + throw; + } + catch(const ::Ice::UserException& __ex) + { + ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); + throw __uue; + } + } + __og.is()->skipEmptyEncaps(); + } + catch(const ::Ice::LocalException& __ex) + { + throw ::IceInternal::LocalExceptionWrapper(__ex, false); + } +} + +::Ehr::DocumentList +IceDelegateM::Ehr::Provider::listDocuments(const ::Ehr::ListDocumentsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Context* __context) +{ + ::IceInternal::Outgoing __og(__handler.get(), __Ehr__Provider__listDocuments_name, ::Ice::Normal, __context); + try + { + ::IceInternal::BasicStream* __os = __og.os(); + __os->write(::Ice::ObjectPtr(::IceInternal::upCast(request.get()))); + requestorSignature.__write(__os); + ownerSignature.__write(__os); + __os->writePendingObjects(); + } + catch(const ::Ice::LocalException& __ex) + { + __og.abort(__ex); + } + bool __ok = __og.invoke(); + ::Ehr::DocumentList __ret; + try + { + if(!__ok) + { + try + { + __og.throwUserException(); + } + catch(const ::Ehr::EhrException&) + { + throw; + } + catch(const ::Ice::UserException& __ex) + { + ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); + throw __uue; + } + } + ::IceInternal::BasicStream* __is = __og.is(); + __is->startReadEncaps(); + ::Ehr::__readDocumentList(__is, __ret); + __is->endReadEncaps(); + return __ret; + } + catch(const ::Ice::LocalException& __ex) + { + throw ::IceInternal::LocalExceptionWrapper(__ex, false); + } +} + +::Ehr::DocumentList +IceDelegateM::Ehr::Provider::findDocuments(const ::Ehr::FindDocumentsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Context* __context) +{ + ::IceInternal::Outgoing __og(__handler.get(), __Ehr__Provider__findDocuments_name, ::Ice::Normal, __context); + try + { + ::IceInternal::BasicStream* __os = __og.os(); + __os->write(::Ice::ObjectPtr(::IceInternal::upCast(request.get()))); + requestorSignature.__write(__os); + ownerSignature.__write(__os); + __os->writePendingObjects(); + } + catch(const ::Ice::LocalException& __ex) + { + __og.abort(__ex); + } + bool __ok = __og.invoke(); + ::Ehr::DocumentList __ret; + try + { + if(!__ok) + { + try + { + __og.throwUserException(); + } + catch(const ::Ehr::EhrException&) + { + throw; + } + catch(const ::Ice::UserException& __ex) + { + ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); + throw __uue; + } + } + ::IceInternal::BasicStream* __is = __og.is(); + __is->startReadEncaps(); + ::Ehr::__readDocumentList(__is, __ret); + __is->endReadEncaps(); + return __ret; + } + catch(const ::Ice::LocalException& __ex) + { + throw ::IceInternal::LocalExceptionWrapper(__ex, false); + } +} + +void +IceDelegateM::Ehr::Provider::setDefaultAccess(const ::Ehr::SetDefaultAccessRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Context* __context) +{ + ::IceInternal::Outgoing __og(__handler.get(), __Ehr__Provider__setDefaultAccess_name, ::Ice::Normal, __context); + try + { + ::IceInternal::BasicStream* __os = __og.os(); + __os->write(::Ice::ObjectPtr(::IceInternal::upCast(request.get()))); + requestorSignature.__write(__os); + __os->writePendingObjects(); + } + catch(const ::Ice::LocalException& __ex) + { + __og.abort(__ex); + } + bool __ok = __og.invoke(); + try + { + if(!__ok) + { + try + { + __og.throwUserException(); + } + catch(const ::Ehr::EhrException&) + { + throw; + } + catch(const ::Ice::UserException& __ex) + { + ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); + throw __uue; + } + } + __og.is()->skipEmptyEncaps(); + } + catch(const ::Ice::LocalException& __ex) + { + throw ::IceInternal::LocalExceptionWrapper(__ex, false); + } +} + +void +IceDelegateM::Ehr::Provider::createPermission(const ::Ehr::CreatePermissionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Context* __context) +{ + ::IceInternal::Outgoing __og(__handler.get(), __Ehr__Provider__createPermission_name, ::Ice::Normal, __context); + try + { + ::IceInternal::BasicStream* __os = __og.os(); + __os->write(::Ice::ObjectPtr(::IceInternal::upCast(request.get()))); + requestorSignature.__write(__os); + __os->writePendingObjects(); + } + catch(const ::Ice::LocalException& __ex) + { + __og.abort(__ex); + } + bool __ok = __og.invoke(); + try + { + if(!__ok) + { + try + { + __og.throwUserException(); + } + catch(const ::Ehr::EhrException&) + { + throw; + } + catch(const ::Ice::UserException& __ex) + { + ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); + throw __uue; + } + } + __og.is()->skipEmptyEncaps(); + } + catch(const ::Ice::LocalException& __ex) + { + throw ::IceInternal::LocalExceptionWrapper(__ex, false); + } +} + +::Ehr::Permissions +IceDelegateM::Ehr::Provider::listPermissions(const ::Ehr::ListPermissionsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Context* __context) +{ + ::IceInternal::Outgoing __og(__handler.get(), __Ehr__Provider__listPermissions_name, ::Ice::Normal, __context); + try + { + ::IceInternal::BasicStream* __os = __og.os(); + __os->write(::Ice::ObjectPtr(::IceInternal::upCast(request.get()))); + requestorSignature.__write(__os); + __os->writePendingObjects(); + } + catch(const ::Ice::LocalException& __ex) + { + __og.abort(__ex); + } + bool __ok = __og.invoke(); + ::Ehr::Permissions __ret; + try + { + if(!__ok) + { + try + { + __og.throwUserException(); + } + catch(const ::Ehr::EhrException&) + { + throw; + } + catch(const ::Ice::UserException& __ex) + { + ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); + throw __uue; + } + } + ::IceInternal::BasicStream* __is = __og.is(); + __is->startReadEncaps(); + __ret.__read(__is); + __is->endReadEncaps(); + return __ret; + } + catch(const ::Ice::LocalException& __ex) + { + throw ::IceInternal::LocalExceptionWrapper(__ex, false); + } +} + +void +IceDelegateM::Ehr::Provider::removePermission(const ::Ehr::RemovePermissionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Context* __context) +{ + ::IceInternal::Outgoing __og(__handler.get(), __Ehr__Provider__removePermission_name, ::Ice::Normal, __context); + try + { + ::IceInternal::BasicStream* __os = __og.os(); + __os->write(::Ice::ObjectPtr(::IceInternal::upCast(request.get()))); + requestorSignature.__write(__os); + __os->writePendingObjects(); + } + catch(const ::Ice::LocalException& __ex) + { + __og.abort(__ex); + } + bool __ok = __og.invoke(); + try + { + if(!__ok) + { + try + { + __og.throwUserException(); + } + catch(const ::Ehr::EhrException&) + { + throw; + } + catch(const ::Ice::UserException& __ex) + { + ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name()); + throw __uue; + } + } + __og.is()->skipEmptyEncaps(); + } + catch(const ::Ice::LocalException& __ex) + { + throw ::IceInternal::LocalExceptionWrapper(__ex, false); + } +} + +void +IceDelegateD::Ehr::Provider::createPrescription(const ::Ehr::CreatePrescriptionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Context* __context) +{ + class _DirectI : public ::IceInternal::Direct + { + public: + + _DirectI(const ::Ehr::CreatePrescriptionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Current& __current) : + ::IceInternal::Direct(__current), + _m_request(request), + _m_requestorSignature(requestorSignature), + _m_ownerSignature(ownerSignature) + { + } + + virtual ::Ice::DispatchStatus + run(::Ice::Object* object) + { + ::Ehr::Provider* servant = dynamic_cast< ::Ehr::Provider*>(object); + if(!servant) + { + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); + } + try + { + servant->createPrescription(_m_request, _m_requestorSignature, _m_ownerSignature, _current); + return ::Ice::DispatchOK; + } + catch(const ::Ice::UserException& __ex) + { + setUserException(__ex); + return ::Ice::DispatchUserException; + } + } + + private: + + const ::Ehr::CreatePrescriptionRequestPtr& _m_request; + const ::Ehr::Signature& _m_requestorSignature; + const ::Ehr::Signature& _m_ownerSignature; + }; + + ::Ice::Current __current; + __initCurrent(__current, __Ehr__Provider__createPrescription_name, ::Ice::Normal, __context); + try + { + _DirectI __direct(request, requestorSignature, ownerSignature, __current); + try + { + __direct.servant()->__collocDispatch(__direct); + } + catch(...) + { + __direct.destroy(); + throw; + } + __direct.destroy(); + } + catch(const ::Ehr::EhrException&) + { + throw; + } + catch(const ::Ice::SystemException&) + { + throw; + } + catch(const ::IceInternal::LocalExceptionWrapper&) + { + throw; + } + catch(const ::std::exception& __ex) + { + ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); + } + catch(...) + { + throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); + } +} + +void +IceDelegateD::Ehr::Provider::consumePrescription(const ::Ehr::ConsumePrescriptionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Context* __context) +{ + class _DirectI : public ::IceInternal::Direct + { + public: + + _DirectI(const ::Ehr::ConsumePrescriptionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Current& __current) : + ::IceInternal::Direct(__current), + _m_request(request), + _m_requestorSignature(requestorSignature), + _m_ownerSignature(ownerSignature) + { + } + + virtual ::Ice::DispatchStatus + run(::Ice::Object* object) + { + ::Ehr::Provider* servant = dynamic_cast< ::Ehr::Provider*>(object); + if(!servant) + { + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); + } + try + { + servant->consumePrescription(_m_request, _m_requestorSignature, _m_ownerSignature, _current); + return ::Ice::DispatchOK; + } + catch(const ::Ice::UserException& __ex) + { + setUserException(__ex); + return ::Ice::DispatchUserException; + } + } + + private: + + const ::Ehr::ConsumePrescriptionRequestPtr& _m_request; + const ::Ehr::Signature& _m_requestorSignature; + const ::Ehr::Signature& _m_ownerSignature; + }; + + ::Ice::Current __current; + __initCurrent(__current, __Ehr__Provider__consumePrescription_name, ::Ice::Normal, __context); + try + { + _DirectI __direct(request, requestorSignature, ownerSignature, __current); + try + { + __direct.servant()->__collocDispatch(__direct); + } + catch(...) + { + __direct.destroy(); + throw; + } + __direct.destroy(); + } + catch(const ::Ehr::EhrException&) + { + throw; + } + catch(const ::Ice::SystemException&) + { + throw; + } + catch(const ::IceInternal::LocalExceptionWrapper&) + { + throw; + } + catch(const ::std::exception& __ex) + { + ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); + } + catch(...) + { + throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); + } +} + +::Ehr::DocumentList +IceDelegateD::Ehr::Provider::listDocuments(const ::Ehr::ListDocumentsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Context* __context) +{ + class _DirectI : public ::IceInternal::Direct + { + public: + + _DirectI(::Ehr::DocumentList& __result, const ::Ehr::ListDocumentsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Current& __current) : + ::IceInternal::Direct(__current), + _result(__result), + _m_request(request), + _m_requestorSignature(requestorSignature), + _m_ownerSignature(ownerSignature) + { + } + + virtual ::Ice::DispatchStatus + run(::Ice::Object* object) + { + ::Ehr::Provider* servant = dynamic_cast< ::Ehr::Provider*>(object); + if(!servant) + { + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); + } + try + { + _result = servant->listDocuments(_m_request, _m_requestorSignature, _m_ownerSignature, _current); + return ::Ice::DispatchOK; + } + catch(const ::Ice::UserException& __ex) + { + setUserException(__ex); + return ::Ice::DispatchUserException; + } + } + + private: + + ::Ehr::DocumentList& _result; + const ::Ehr::ListDocumentsRequestPtr& _m_request; + const ::Ehr::Signature& _m_requestorSignature; + const ::Ehr::Signature& _m_ownerSignature; + }; + + ::Ice::Current __current; + __initCurrent(__current, __Ehr__Provider__listDocuments_name, ::Ice::Normal, __context); + ::Ehr::DocumentList __result; + try + { + _DirectI __direct(__result, request, requestorSignature, ownerSignature, __current); + try + { + __direct.servant()->__collocDispatch(__direct); + } + catch(...) + { + __direct.destroy(); + throw; + } + __direct.destroy(); + } + catch(const ::Ehr::EhrException&) + { + throw; + } + catch(const ::Ice::SystemException&) + { + throw; + } + catch(const ::IceInternal::LocalExceptionWrapper&) + { + throw; + } + catch(const ::std::exception& __ex) + { + ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); + } + catch(...) + { + throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); + } + return __result; +} + +::Ehr::DocumentList +IceDelegateD::Ehr::Provider::findDocuments(const ::Ehr::FindDocumentsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Context* __context) +{ + class _DirectI : public ::IceInternal::Direct + { + public: + + _DirectI(::Ehr::DocumentList& __result, const ::Ehr::FindDocumentsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Current& __current) : + ::IceInternal::Direct(__current), + _result(__result), + _m_request(request), + _m_requestorSignature(requestorSignature), + _m_ownerSignature(ownerSignature) + { + } + + virtual ::Ice::DispatchStatus + run(::Ice::Object* object) + { + ::Ehr::Provider* servant = dynamic_cast< ::Ehr::Provider*>(object); + if(!servant) + { + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); + } + try + { + _result = servant->findDocuments(_m_request, _m_requestorSignature, _m_ownerSignature, _current); + return ::Ice::DispatchOK; + } + catch(const ::Ice::UserException& __ex) + { + setUserException(__ex); + return ::Ice::DispatchUserException; + } + } + + private: + + ::Ehr::DocumentList& _result; + const ::Ehr::FindDocumentsRequestPtr& _m_request; + const ::Ehr::Signature& _m_requestorSignature; + const ::Ehr::Signature& _m_ownerSignature; + }; + + ::Ice::Current __current; + __initCurrent(__current, __Ehr__Provider__findDocuments_name, ::Ice::Normal, __context); + ::Ehr::DocumentList __result; + try + { + _DirectI __direct(__result, request, requestorSignature, ownerSignature, __current); + try + { + __direct.servant()->__collocDispatch(__direct); + } + catch(...) + { + __direct.destroy(); + throw; + } + __direct.destroy(); + } + catch(const ::Ehr::EhrException&) + { + throw; + } + catch(const ::Ice::SystemException&) + { + throw; + } + catch(const ::IceInternal::LocalExceptionWrapper&) + { + throw; + } + catch(const ::std::exception& __ex) + { + ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); + } + catch(...) + { + throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); + } + return __result; +} + +void +IceDelegateD::Ehr::Provider::setDefaultAccess(const ::Ehr::SetDefaultAccessRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Context* __context) +{ + class _DirectI : public ::IceInternal::Direct + { + public: + + _DirectI(const ::Ehr::SetDefaultAccessRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Current& __current) : + ::IceInternal::Direct(__current), + _m_request(request), + _m_requestorSignature(requestorSignature) + { + } + + virtual ::Ice::DispatchStatus + run(::Ice::Object* object) + { + ::Ehr::Provider* servant = dynamic_cast< ::Ehr::Provider*>(object); + if(!servant) + { + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); + } + try + { + servant->setDefaultAccess(_m_request, _m_requestorSignature, _current); + return ::Ice::DispatchOK; + } + catch(const ::Ice::UserException& __ex) + { + setUserException(__ex); + return ::Ice::DispatchUserException; + } + } + + private: + + const ::Ehr::SetDefaultAccessRequestPtr& _m_request; + const ::Ehr::Signature& _m_requestorSignature; + }; + + ::Ice::Current __current; + __initCurrent(__current, __Ehr__Provider__setDefaultAccess_name, ::Ice::Normal, __context); + try + { + _DirectI __direct(request, requestorSignature, __current); + try + { + __direct.servant()->__collocDispatch(__direct); + } + catch(...) + { + __direct.destroy(); + throw; + } + __direct.destroy(); + } + catch(const ::Ehr::EhrException&) + { + throw; + } + catch(const ::Ice::SystemException&) + { + throw; + } + catch(const ::IceInternal::LocalExceptionWrapper&) + { + throw; + } + catch(const ::std::exception& __ex) + { + ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); + } + catch(...) + { + throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); + } +} + +void +IceDelegateD::Ehr::Provider::createPermission(const ::Ehr::CreatePermissionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Context* __context) +{ + class _DirectI : public ::IceInternal::Direct + { + public: + + _DirectI(const ::Ehr::CreatePermissionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Current& __current) : + ::IceInternal::Direct(__current), + _m_request(request), + _m_requestorSignature(requestorSignature) + { + } + + virtual ::Ice::DispatchStatus + run(::Ice::Object* object) + { + ::Ehr::Provider* servant = dynamic_cast< ::Ehr::Provider*>(object); + if(!servant) + { + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); + } + try + { + servant->createPermission(_m_request, _m_requestorSignature, _current); + return ::Ice::DispatchOK; + } + catch(const ::Ice::UserException& __ex) + { + setUserException(__ex); + return ::Ice::DispatchUserException; + } + } + + private: + + const ::Ehr::CreatePermissionRequestPtr& _m_request; + const ::Ehr::Signature& _m_requestorSignature; + }; + + ::Ice::Current __current; + __initCurrent(__current, __Ehr__Provider__createPermission_name, ::Ice::Normal, __context); + try + { + _DirectI __direct(request, requestorSignature, __current); + try + { + __direct.servant()->__collocDispatch(__direct); + } + catch(...) + { + __direct.destroy(); + throw; + } + __direct.destroy(); + } + catch(const ::Ehr::EhrException&) + { + throw; + } + catch(const ::Ice::SystemException&) + { + throw; + } + catch(const ::IceInternal::LocalExceptionWrapper&) + { + throw; + } + catch(const ::std::exception& __ex) + { + ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); + } + catch(...) + { + throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); + } +} + +::Ehr::Permissions +IceDelegateD::Ehr::Provider::listPermissions(const ::Ehr::ListPermissionsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Context* __context) +{ + class _DirectI : public ::IceInternal::Direct + { + public: + + _DirectI(::Ehr::Permissions& __result, const ::Ehr::ListPermissionsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Current& __current) : + ::IceInternal::Direct(__current), + _result(__result), + _m_request(request), + _m_requestorSignature(requestorSignature) + { + } + + virtual ::Ice::DispatchStatus + run(::Ice::Object* object) + { + ::Ehr::Provider* servant = dynamic_cast< ::Ehr::Provider*>(object); + if(!servant) + { + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); + } + try + { + _result = servant->listPermissions(_m_request, _m_requestorSignature, _current); + return ::Ice::DispatchOK; + } + catch(const ::Ice::UserException& __ex) + { + setUserException(__ex); + return ::Ice::DispatchUserException; + } + } + + private: + + ::Ehr::Permissions& _result; + const ::Ehr::ListPermissionsRequestPtr& _m_request; + const ::Ehr::Signature& _m_requestorSignature; + }; + + ::Ice::Current __current; + __initCurrent(__current, __Ehr__Provider__listPermissions_name, ::Ice::Normal, __context); + ::Ehr::Permissions __result; + try + { + _DirectI __direct(__result, request, requestorSignature, __current); + try + { + __direct.servant()->__collocDispatch(__direct); + } + catch(...) + { + __direct.destroy(); + throw; + } + __direct.destroy(); + } + catch(const ::Ehr::EhrException&) + { + throw; + } + catch(const ::Ice::SystemException&) + { + throw; + } + catch(const ::IceInternal::LocalExceptionWrapper&) + { + throw; + } + catch(const ::std::exception& __ex) + { + ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); + } + catch(...) + { + throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); + } + return __result; +} + +void +IceDelegateD::Ehr::Provider::removePermission(const ::Ehr::RemovePermissionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Context* __context) +{ + class _DirectI : public ::IceInternal::Direct + { + public: + + _DirectI(const ::Ehr::RemovePermissionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Current& __current) : + ::IceInternal::Direct(__current), + _m_request(request), + _m_requestorSignature(requestorSignature) + { + } + + virtual ::Ice::DispatchStatus + run(::Ice::Object* object) + { + ::Ehr::Provider* servant = dynamic_cast< ::Ehr::Provider*>(object); + if(!servant) + { + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation); + } + try + { + servant->removePermission(_m_request, _m_requestorSignature, _current); + return ::Ice::DispatchOK; + } + catch(const ::Ice::UserException& __ex) + { + setUserException(__ex); + return ::Ice::DispatchUserException; + } + } + + private: + + const ::Ehr::RemovePermissionRequestPtr& _m_request; + const ::Ehr::Signature& _m_requestorSignature; + }; + + ::Ice::Current __current; + __initCurrent(__current, __Ehr__Provider__removePermission_name, ::Ice::Normal, __context); + try + { + _DirectI __direct(request, requestorSignature, __current); + try + { + __direct.servant()->__collocDispatch(__direct); + } + catch(...) + { + __direct.destroy(); + throw; + } + __direct.destroy(); + } + catch(const ::Ehr::EhrException&) + { + throw; + } + catch(const ::Ice::SystemException&) + { + throw; + } + catch(const ::IceInternal::LocalExceptionWrapper&) + { + throw; + } + catch(const ::std::exception& __ex) + { + ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex); + } + catch(...) + { + throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false); + } +} + +Ehr::Document::Document(::Ehr::DocumentType __ice_type) : + type(__ice_type) +{ +} + +::Ice::ObjectPtr +Ehr::Document::ice_clone() const +{ + ::Ehr::DocumentPtr __p = new ::Ehr::Document(*this); + return __p; +} + +static const ::std::string __Ehr__Document_ids[2] = +{ + "::Ehr::Document", + "::Ice::Object" +}; + +bool +Ehr::Document::ice_isA(const ::std::string& _s, const ::Ice::Current&) const +{ + return ::std::binary_search(__Ehr__Document_ids, __Ehr__Document_ids + 2, _s); +} + +::std::vector< ::std::string> +Ehr::Document::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&__Ehr__Document_ids[0], &__Ehr__Document_ids[2]); +} + +const ::std::string& +Ehr::Document::ice_id(const ::Ice::Current&) const +{ + return __Ehr__Document_ids[0]; +} + +const ::std::string& +Ehr::Document::ice_staticId() +{ + return __Ehr__Document_ids[0]; +} + +void +Ehr::Document::__write(::IceInternal::BasicStream* __os) const +{ + __os->writeTypeId(ice_staticId()); + __os->startWriteSlice(); + ::Ehr::__write(__os, type); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Object::__write(__os); +#else + ::Ice::Object::__write(__os); +#endif +} + +void +Ehr::Document::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->readTypeId(myId); + } + __is->startReadSlice(); + ::Ehr::__read(__is, type); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Object::__read(__is, true); +#else + ::Ice::Object::__read(__is, true); +#endif +} + +void +Ehr::Document::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeTypeId(ice_staticId()); + __outS->startSlice(); + ::Ehr::ice_writeDocumentType(__outS, type); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Object::__write(__outS); +#else + ::Ice::Object::__write(__outS); +#endif +} + +void +Ehr::Document::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readTypeId(); + } + __inS->startSlice(); + ::Ehr::ice_readDocumentType(__inS, type); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Object::__read(__inS, true); +#else + ::Ice::Object::__read(__inS, true); +#endif +} + +class __F__Ehr__Document : public ::Ice::ObjectFactory +{ +public: + + virtual ::Ice::ObjectPtr + create(const ::std::string& type) + { + assert(type == ::Ehr::Document::ice_staticId()); + return new ::Ehr::Document; + } + + virtual void + destroy() + { + } +}; + +static ::Ice::ObjectFactoryPtr __F__Ehr__Document_Ptr = new __F__Ehr__Document; + +const ::Ice::ObjectFactoryPtr& +Ehr::Document::ice_factory() +{ + return __F__Ehr__Document_Ptr; +} + +class __F__Ehr__Document__Init +{ +public: + + __F__Ehr__Document__Init() + { + ::IceInternal::factoryTable->addObjectFactory(::Ehr::Document::ice_staticId(), ::Ehr::Document::ice_factory()); + } + + ~__F__Ehr__Document__Init() + { + ::IceInternal::factoryTable->removeObjectFactory(::Ehr::Document::ice_staticId()); + } +}; + +static __F__Ehr__Document__Init __F__Ehr__Document__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__Document__initializer() {} } +#endif + +void +Ehr::__patch__DocumentPtr(void* __addr, ::Ice::ObjectPtr& v) +{ + ::Ehr::DocumentPtr* p = static_cast< ::Ehr::DocumentPtr*>(__addr); + assert(p); + *p = ::Ehr::DocumentPtr::dynamicCast(v); + if(v && !*p) + { + IceInternal::Ex::throwUOE(::Ehr::Document::ice_staticId(), v->ice_id()); + } +} + +bool +Ehr::operator==(const ::Ehr::Document& l, const ::Ehr::Document& r) +{ + return static_cast(l) == static_cast(r); +} + +bool +Ehr::operator<(const ::Ehr::Document& l, const ::Ehr::Document& r) +{ + return static_cast(l) < static_cast(r); +} + +Ehr::Prescription::Prescription(::Ehr::DocumentType __ice_type, const ::std::string& __ice_originatorName, const ::std::string& __ice_originatorProfession, const ::std::string& __ice_originatorAddress, const ::Ehr::Date& __ice_creationDate, const ::std::string& __ice_consumerName, const ::Ehr::Date& __ice_consumerDateOfBirth, const ::std::string& __ice_drugDescription, const ::std::string& __ice_form, ::Ice::Int __ice_dosage, const ::std::string& __ice_measuringUnit, const ::Ehr::Date& __ice_validFrom, const ::Ehr::Date& __ice_expires) : +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Document(__ice_type) +#else + ::Ehr::Document(__ice_type) +#endif +, + originatorName(__ice_originatorName), + originatorProfession(__ice_originatorProfession), + originatorAddress(__ice_originatorAddress), + creationDate(__ice_creationDate), + consumerName(__ice_consumerName), + consumerDateOfBirth(__ice_consumerDateOfBirth), + drugDescription(__ice_drugDescription), + form(__ice_form), + dosage(__ice_dosage), + measuringUnit(__ice_measuringUnit), + validFrom(__ice_validFrom), + expires(__ice_expires) +{ +} + +::Ice::ObjectPtr +Ehr::Prescription::ice_clone() const +{ + ::Ehr::PrescriptionPtr __p = new ::Ehr::Prescription(*this); + return __p; +} + +static const ::std::string __Ehr__Prescription_ids[3] = +{ + "::Ehr::Document", + "::Ehr::Prescription", + "::Ice::Object" +}; + +bool +Ehr::Prescription::ice_isA(const ::std::string& _s, const ::Ice::Current&) const +{ + return ::std::binary_search(__Ehr__Prescription_ids, __Ehr__Prescription_ids + 3, _s); +} + +::std::vector< ::std::string> +Ehr::Prescription::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&__Ehr__Prescription_ids[0], &__Ehr__Prescription_ids[3]); +} + +const ::std::string& +Ehr::Prescription::ice_id(const ::Ice::Current&) const +{ + return __Ehr__Prescription_ids[1]; +} + +const ::std::string& +Ehr::Prescription::ice_staticId() +{ + return __Ehr__Prescription_ids[1]; +} + +void +Ehr::Prescription::__write(::IceInternal::BasicStream* __os) const +{ + __os->writeTypeId(ice_staticId()); + __os->startWriteSlice(); + __os->write(originatorName); + __os->write(originatorProfession); + __os->write(originatorAddress); + creationDate.__write(__os); + __os->write(consumerName); + consumerDateOfBirth.__write(__os); + __os->write(drugDescription); + __os->write(form); + __os->write(dosage); + __os->write(measuringUnit); + validFrom.__write(__os); + expires.__write(__os); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Document::__write(__os); +#else + ::Ehr::Document::__write(__os); +#endif +} + +void +Ehr::Prescription::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->readTypeId(myId); + } + __is->startReadSlice(); + __is->read(originatorName); + __is->read(originatorProfession); + __is->read(originatorAddress); + creationDate.__read(__is); + __is->read(consumerName); + consumerDateOfBirth.__read(__is); + __is->read(drugDescription); + __is->read(form); + __is->read(dosage); + __is->read(measuringUnit); + validFrom.__read(__is); + expires.__read(__is); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Document::__read(__is, true); +#else + ::Ehr::Document::__read(__is, true); +#endif +} + +void +Ehr::Prescription::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeTypeId(ice_staticId()); + __outS->startSlice(); + __outS->writeString(originatorName); + __outS->writeString(originatorProfession); + __outS->writeString(originatorAddress); + ::Ehr::ice_writeDate(__outS, creationDate); + __outS->writeString(consumerName); + ::Ehr::ice_writeDate(__outS, consumerDateOfBirth); + __outS->writeString(drugDescription); + __outS->writeString(form); + __outS->writeInt(dosage); + __outS->writeString(measuringUnit); + ::Ehr::ice_writeDate(__outS, validFrom); + ::Ehr::ice_writeDate(__outS, expires); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Document::__write(__outS); +#else + ::Ehr::Document::__write(__outS); +#endif +} + +void +Ehr::Prescription::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readTypeId(); + } + __inS->startSlice(); + originatorName = __inS->readString(); + originatorProfession = __inS->readString(); + originatorAddress = __inS->readString(); + ::Ehr::ice_readDate(__inS, creationDate); + consumerName = __inS->readString(); + ::Ehr::ice_readDate(__inS, consumerDateOfBirth); + drugDescription = __inS->readString(); + form = __inS->readString(); + dosage = __inS->readInt(); + measuringUnit = __inS->readString(); + ::Ehr::ice_readDate(__inS, validFrom); + ::Ehr::ice_readDate(__inS, expires); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Document::__read(__inS, true); +#else + ::Ehr::Document::__read(__inS, true); +#endif +} + +class __F__Ehr__Prescription : public ::Ice::ObjectFactory +{ +public: + + virtual ::Ice::ObjectPtr + create(const ::std::string& type) + { + assert(type == ::Ehr::Prescription::ice_staticId()); + return new ::Ehr::Prescription; + } + + virtual void + destroy() + { + } +}; + +static ::Ice::ObjectFactoryPtr __F__Ehr__Prescription_Ptr = new __F__Ehr__Prescription; + +const ::Ice::ObjectFactoryPtr& +Ehr::Prescription::ice_factory() +{ + return __F__Ehr__Prescription_Ptr; +} + +class __F__Ehr__Prescription__Init +{ +public: + + __F__Ehr__Prescription__Init() + { + ::IceInternal::factoryTable->addObjectFactory(::Ehr::Prescription::ice_staticId(), ::Ehr::Prescription::ice_factory()); + } + + ~__F__Ehr__Prescription__Init() + { + ::IceInternal::factoryTable->removeObjectFactory(::Ehr::Prescription::ice_staticId()); + } +}; + +static __F__Ehr__Prescription__Init __F__Ehr__Prescription__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__Prescription__initializer() {} } +#endif + +void +Ehr::__patch__PrescriptionPtr(void* __addr, ::Ice::ObjectPtr& v) +{ + ::Ehr::PrescriptionPtr* p = static_cast< ::Ehr::PrescriptionPtr*>(__addr); + assert(p); + *p = ::Ehr::PrescriptionPtr::dynamicCast(v); + if(v && !*p) + { + IceInternal::Ex::throwUOE(::Ehr::Prescription::ice_staticId(), v->ice_id()); + } +} + +bool +Ehr::operator==(const ::Ehr::Prescription& l, const ::Ehr::Prescription& r) +{ + return static_cast(l) == static_cast(r); +} + +bool +Ehr::operator<(const ::Ehr::Prescription& l, const ::Ehr::Prescription& r) +{ + return static_cast(l) < static_cast(r); +} + +Ehr::ConsumedPrescription::ConsumedPrescription(::Ehr::DocumentType __ice_type, const ::std::string& __ice_originatorName, const ::std::string& __ice_originatorProfession, const ::std::string& __ice_originatorAddress, const ::Ehr::Date& __ice_creationDate, const ::std::string& __ice_consumerName, const ::Ehr::Date& __ice_consumerDateOfBirth, const ::std::string& __ice_drugDescription, const ::std::string& __ice_form, ::Ice::Int __ice_dosage, const ::std::string& __ice_measuringUnit, const ::Ehr::Date& __ice_validFrom, const ::Ehr::Date& __ice_expires, const ::std::string& __ice_dispenserName, const ::std::string& __ice_dispenserProfession, const ::std::string& __ice_dispenserAddress, const ::Ehr::Date& __ice_dispensingDate) : +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Document(__ice_type) +#else + ::Ehr::Document(__ice_type) +#endif +, +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Prescription(__ice_type, __ice_originatorName, __ice_originatorProfession, __ice_originatorAddress, __ice_creationDate, __ice_consumerName, __ice_consumerDateOfBirth, __ice_drugDescription, __ice_form, __ice_dosage, __ice_measuringUnit, __ice_validFrom, __ice_expires) +#else + ::Ehr::Prescription(__ice_type, __ice_originatorName, __ice_originatorProfession, __ice_originatorAddress, __ice_creationDate, __ice_consumerName, __ice_consumerDateOfBirth, __ice_drugDescription, __ice_form, __ice_dosage, __ice_measuringUnit, __ice_validFrom, __ice_expires) +#endif +, + dispenserName(__ice_dispenserName), + dispenserProfession(__ice_dispenserProfession), + dispenserAddress(__ice_dispenserAddress), + dispensingDate(__ice_dispensingDate) +{ +} + +::Ice::ObjectPtr +Ehr::ConsumedPrescription::ice_clone() const +{ + ::Ehr::ConsumedPrescriptionPtr __p = new ::Ehr::ConsumedPrescription(*this); + return __p; +} + +static const ::std::string __Ehr__ConsumedPrescription_ids[4] = +{ + "::Ehr::ConsumedPrescription", + "::Ehr::Document", + "::Ehr::Prescription", + "::Ice::Object" +}; + +bool +Ehr::ConsumedPrescription::ice_isA(const ::std::string& _s, const ::Ice::Current&) const +{ + return ::std::binary_search(__Ehr__ConsumedPrescription_ids, __Ehr__ConsumedPrescription_ids + 4, _s); +} + +::std::vector< ::std::string> +Ehr::ConsumedPrescription::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&__Ehr__ConsumedPrescription_ids[0], &__Ehr__ConsumedPrescription_ids[4]); +} + +const ::std::string& +Ehr::ConsumedPrescription::ice_id(const ::Ice::Current&) const +{ + return __Ehr__ConsumedPrescription_ids[0]; +} + +const ::std::string& +Ehr::ConsumedPrescription::ice_staticId() +{ + return __Ehr__ConsumedPrescription_ids[0]; +} + +void +Ehr::ConsumedPrescription::__write(::IceInternal::BasicStream* __os) const +{ + __os->writeTypeId(ice_staticId()); + __os->startWriteSlice(); + __os->write(dispenserName); + __os->write(dispenserProfession); + __os->write(dispenserAddress); + dispensingDate.__write(__os); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Prescription::__write(__os); +#else + ::Ehr::Prescription::__write(__os); +#endif +} + +void +Ehr::ConsumedPrescription::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->readTypeId(myId); + } + __is->startReadSlice(); + __is->read(dispenserName); + __is->read(dispenserProfession); + __is->read(dispenserAddress); + dispensingDate.__read(__is); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Prescription::__read(__is, true); +#else + ::Ehr::Prescription::__read(__is, true); +#endif +} + +void +Ehr::ConsumedPrescription::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeTypeId(ice_staticId()); + __outS->startSlice(); + __outS->writeString(dispenserName); + __outS->writeString(dispenserProfession); + __outS->writeString(dispenserAddress); + ::Ehr::ice_writeDate(__outS, dispensingDate); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Prescription::__write(__outS); +#else + ::Ehr::Prescription::__write(__outS); +#endif +} + +void +Ehr::ConsumedPrescription::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readTypeId(); + } + __inS->startSlice(); + dispenserName = __inS->readString(); + dispenserProfession = __inS->readString(); + dispenserAddress = __inS->readString(); + ::Ehr::ice_readDate(__inS, dispensingDate); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Prescription::__read(__inS, true); +#else + ::Ehr::Prescription::__read(__inS, true); +#endif +} + +class __F__Ehr__ConsumedPrescription : public ::Ice::ObjectFactory +{ +public: + + virtual ::Ice::ObjectPtr + create(const ::std::string& type) + { + assert(type == ::Ehr::ConsumedPrescription::ice_staticId()); + return new ::Ehr::ConsumedPrescription; + } + + virtual void + destroy() + { + } +}; + +static ::Ice::ObjectFactoryPtr __F__Ehr__ConsumedPrescription_Ptr = new __F__Ehr__ConsumedPrescription; + +const ::Ice::ObjectFactoryPtr& +Ehr::ConsumedPrescription::ice_factory() +{ + return __F__Ehr__ConsumedPrescription_Ptr; +} + +class __F__Ehr__ConsumedPrescription__Init +{ +public: + + __F__Ehr__ConsumedPrescription__Init() + { + ::IceInternal::factoryTable->addObjectFactory(::Ehr::ConsumedPrescription::ice_staticId(), ::Ehr::ConsumedPrescription::ice_factory()); + } + + ~__F__Ehr__ConsumedPrescription__Init() + { + ::IceInternal::factoryTable->removeObjectFactory(::Ehr::ConsumedPrescription::ice_staticId()); + } +}; + +static __F__Ehr__ConsumedPrescription__Init __F__Ehr__ConsumedPrescription__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__ConsumedPrescription__initializer() {} } +#endif + +void +Ehr::__patch__ConsumedPrescriptionPtr(void* __addr, ::Ice::ObjectPtr& v) +{ + ::Ehr::ConsumedPrescriptionPtr* p = static_cast< ::Ehr::ConsumedPrescriptionPtr*>(__addr); + assert(p); + *p = ::Ehr::ConsumedPrescriptionPtr::dynamicCast(v); + if(v && !*p) + { + IceInternal::Ex::throwUOE(::Ehr::ConsumedPrescription::ice_staticId(), v->ice_id()); + } +} + +bool +Ehr::operator==(const ::Ehr::ConsumedPrescription& l, const ::Ehr::ConsumedPrescription& r) +{ + return static_cast(l) == static_cast(r); +} + +bool +Ehr::operator<(const ::Ehr::ConsumedPrescription& l, const ::Ehr::ConsumedPrescription& r) +{ + return static_cast(l) < static_cast(r); +} + +Ehr::Request::Request(const ::Ehr::AccountIdentifier& __ice_requestor, const ::Ehr::Timestamp& __ice_when) : + requestor(__ice_requestor), + when(__ice_when) +{ +} + +::Ice::ObjectPtr +Ehr::Request::ice_clone() const +{ + ::Ehr::RequestPtr __p = new ::Ehr::Request(*this); + return __p; +} + +static const ::std::string __Ehr__Request_ids[2] = +{ + "::Ehr::Request", + "::Ice::Object" +}; + +bool +Ehr::Request::ice_isA(const ::std::string& _s, const ::Ice::Current&) const +{ + return ::std::binary_search(__Ehr__Request_ids, __Ehr__Request_ids + 2, _s); +} + +::std::vector< ::std::string> +Ehr::Request::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&__Ehr__Request_ids[0], &__Ehr__Request_ids[2]); +} + +const ::std::string& +Ehr::Request::ice_id(const ::Ice::Current&) const +{ + return __Ehr__Request_ids[0]; +} + +const ::std::string& +Ehr::Request::ice_staticId() +{ + return __Ehr__Request_ids[0]; +} + +void +Ehr::Request::__write(::IceInternal::BasicStream* __os) const +{ + __os->writeTypeId(ice_staticId()); + __os->startWriteSlice(); + requestor.__write(__os); + when.__write(__os); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Object::__write(__os); +#else + ::Ice::Object::__write(__os); +#endif +} + +void +Ehr::Request::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->readTypeId(myId); + } + __is->startReadSlice(); + requestor.__read(__is); + when.__read(__is); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Object::__read(__is, true); +#else + ::Ice::Object::__read(__is, true); +#endif +} + +void +Ehr::Request::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeTypeId(ice_staticId()); + __outS->startSlice(); + ::Ehr::ice_writeAccountIdentifier(__outS, requestor); + ::Ehr::ice_writeTimestamp(__outS, when); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Object::__write(__outS); +#else + ::Ice::Object::__write(__outS); +#endif +} + +void +Ehr::Request::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readTypeId(); + } + __inS->startSlice(); + ::Ehr::ice_readAccountIdentifier(__inS, requestor); + ::Ehr::ice_readTimestamp(__inS, when); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Object::__read(__inS, true); +#else + ::Ice::Object::__read(__inS, true); +#endif +} + +class __F__Ehr__Request : public ::Ice::ObjectFactory +{ +public: + + virtual ::Ice::ObjectPtr + create(const ::std::string& type) + { + assert(type == ::Ehr::Request::ice_staticId()); + return new ::Ehr::Request; + } + + virtual void + destroy() + { + } +}; + +static ::Ice::ObjectFactoryPtr __F__Ehr__Request_Ptr = new __F__Ehr__Request; + +const ::Ice::ObjectFactoryPtr& +Ehr::Request::ice_factory() +{ + return __F__Ehr__Request_Ptr; +} + +class __F__Ehr__Request__Init +{ +public: + + __F__Ehr__Request__Init() + { + ::IceInternal::factoryTable->addObjectFactory(::Ehr::Request::ice_staticId(), ::Ehr::Request::ice_factory()); + } + + ~__F__Ehr__Request__Init() + { + ::IceInternal::factoryTable->removeObjectFactory(::Ehr::Request::ice_staticId()); + } +}; + +static __F__Ehr__Request__Init __F__Ehr__Request__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__Request__initializer() {} } +#endif + +void +Ehr::__patch__RequestPtr(void* __addr, ::Ice::ObjectPtr& v) +{ + ::Ehr::RequestPtr* p = static_cast< ::Ehr::RequestPtr*>(__addr); + assert(p); + *p = ::Ehr::RequestPtr::dynamicCast(v); + if(v && !*p) + { + IceInternal::Ex::throwUOE(::Ehr::Request::ice_staticId(), v->ice_id()); + } +} + +bool +Ehr::operator==(const ::Ehr::Request& l, const ::Ehr::Request& r) +{ + return static_cast(l) == static_cast(r); +} + +bool +Ehr::operator<(const ::Ehr::Request& l, const ::Ehr::Request& r) +{ + return static_cast(l) < static_cast(r); +} + +Ehr::ThirdPartyRequest::ThirdPartyRequest(const ::Ehr::AccountIdentifier& __ice_requestor, const ::Ehr::Timestamp& __ice_when, const ::Ehr::AccountIdentifier& __ice_owner) : +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request(__ice_requestor, __ice_when) +#else + ::Ehr::Request(__ice_requestor, __ice_when) +#endif +, + owner(__ice_owner) +{ +} + +::Ice::ObjectPtr +Ehr::ThirdPartyRequest::ice_clone() const +{ + ::Ehr::ThirdPartyRequestPtr __p = new ::Ehr::ThirdPartyRequest(*this); + return __p; +} + +static const ::std::string __Ehr__ThirdPartyRequest_ids[3] = +{ + "::Ehr::Request", + "::Ehr::ThirdPartyRequest", + "::Ice::Object" +}; + +bool +Ehr::ThirdPartyRequest::ice_isA(const ::std::string& _s, const ::Ice::Current&) const +{ + return ::std::binary_search(__Ehr__ThirdPartyRequest_ids, __Ehr__ThirdPartyRequest_ids + 3, _s); +} + +::std::vector< ::std::string> +Ehr::ThirdPartyRequest::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&__Ehr__ThirdPartyRequest_ids[0], &__Ehr__ThirdPartyRequest_ids[3]); +} + +const ::std::string& +Ehr::ThirdPartyRequest::ice_id(const ::Ice::Current&) const +{ + return __Ehr__ThirdPartyRequest_ids[1]; +} + +const ::std::string& +Ehr::ThirdPartyRequest::ice_staticId() +{ + return __Ehr__ThirdPartyRequest_ids[1]; +} + +void +Ehr::ThirdPartyRequest::__write(::IceInternal::BasicStream* __os) const +{ + __os->writeTypeId(ice_staticId()); + __os->startWriteSlice(); + owner.__write(__os); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__write(__os); +#else + ::Ehr::Request::__write(__os); +#endif +} + +void +Ehr::ThirdPartyRequest::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->readTypeId(myId); + } + __is->startReadSlice(); + owner.__read(__is); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__read(__is, true); +#else + ::Ehr::Request::__read(__is, true); +#endif +} + +void +Ehr::ThirdPartyRequest::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeTypeId(ice_staticId()); + __outS->startSlice(); + ::Ehr::ice_writeAccountIdentifier(__outS, owner); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__write(__outS); +#else + ::Ehr::Request::__write(__outS); +#endif +} + +void +Ehr::ThirdPartyRequest::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readTypeId(); + } + __inS->startSlice(); + ::Ehr::ice_readAccountIdentifier(__inS, owner); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__read(__inS, true); +#else + ::Ehr::Request::__read(__inS, true); +#endif +} + +class __F__Ehr__ThirdPartyRequest : public ::Ice::ObjectFactory +{ +public: + + virtual ::Ice::ObjectPtr + create(const ::std::string& type) + { + assert(type == ::Ehr::ThirdPartyRequest::ice_staticId()); + return new ::Ehr::ThirdPartyRequest; + } + + virtual void + destroy() + { + } +}; + +static ::Ice::ObjectFactoryPtr __F__Ehr__ThirdPartyRequest_Ptr = new __F__Ehr__ThirdPartyRequest; + +const ::Ice::ObjectFactoryPtr& +Ehr::ThirdPartyRequest::ice_factory() +{ + return __F__Ehr__ThirdPartyRequest_Ptr; +} + +class __F__Ehr__ThirdPartyRequest__Init +{ +public: + + __F__Ehr__ThirdPartyRequest__Init() + { + ::IceInternal::factoryTable->addObjectFactory(::Ehr::ThirdPartyRequest::ice_staticId(), ::Ehr::ThirdPartyRequest::ice_factory()); + } + + ~__F__Ehr__ThirdPartyRequest__Init() + { + ::IceInternal::factoryTable->removeObjectFactory(::Ehr::ThirdPartyRequest::ice_staticId()); + } +}; + +static __F__Ehr__ThirdPartyRequest__Init __F__Ehr__ThirdPartyRequest__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__ThirdPartyRequest__initializer() {} } +#endif + +void +Ehr::__patch__ThirdPartyRequestPtr(void* __addr, ::Ice::ObjectPtr& v) +{ + ::Ehr::ThirdPartyRequestPtr* p = static_cast< ::Ehr::ThirdPartyRequestPtr*>(__addr); + assert(p); + *p = ::Ehr::ThirdPartyRequestPtr::dynamicCast(v); + if(v && !*p) + { + IceInternal::Ex::throwUOE(::Ehr::ThirdPartyRequest::ice_staticId(), v->ice_id()); + } +} + +bool +Ehr::operator==(const ::Ehr::ThirdPartyRequest& l, const ::Ehr::ThirdPartyRequest& r) +{ + return static_cast(l) == static_cast(r); +} + +bool +Ehr::operator<(const ::Ehr::ThirdPartyRequest& l, const ::Ehr::ThirdPartyRequest& r) +{ + return static_cast(l) < static_cast(r); +} + +Ehr::CreatePrescriptionRequest::CreatePrescriptionRequest(const ::Ehr::AccountIdentifier& __ice_requestor, const ::Ehr::Timestamp& __ice_when, const ::Ehr::AccountIdentifier& __ice_owner, const ::Ehr::EncryptedDocument& __ice_prescription) : +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request(__ice_requestor, __ice_when) +#else + ::Ehr::Request(__ice_requestor, __ice_when) +#endif +, +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest(__ice_requestor, __ice_when, __ice_owner) +#else + ::Ehr::ThirdPartyRequest(__ice_requestor, __ice_when, __ice_owner) +#endif +, + prescription(__ice_prescription) +{ +} + +::Ice::ObjectPtr +Ehr::CreatePrescriptionRequest::ice_clone() const +{ + ::Ehr::CreatePrescriptionRequestPtr __p = new ::Ehr::CreatePrescriptionRequest(*this); + return __p; +} + +static const ::std::string __Ehr__CreatePrescriptionRequest_ids[4] = +{ + "::Ehr::CreatePrescriptionRequest", + "::Ehr::Request", + "::Ehr::ThirdPartyRequest", + "::Ice::Object" +}; + +bool +Ehr::CreatePrescriptionRequest::ice_isA(const ::std::string& _s, const ::Ice::Current&) const +{ + return ::std::binary_search(__Ehr__CreatePrescriptionRequest_ids, __Ehr__CreatePrescriptionRequest_ids + 4, _s); +} + +::std::vector< ::std::string> +Ehr::CreatePrescriptionRequest::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&__Ehr__CreatePrescriptionRequest_ids[0], &__Ehr__CreatePrescriptionRequest_ids[4]); +} + +const ::std::string& +Ehr::CreatePrescriptionRequest::ice_id(const ::Ice::Current&) const +{ + return __Ehr__CreatePrescriptionRequest_ids[0]; +} + +const ::std::string& +Ehr::CreatePrescriptionRequest::ice_staticId() +{ + return __Ehr__CreatePrescriptionRequest_ids[0]; +} + +void +Ehr::CreatePrescriptionRequest::__write(::IceInternal::BasicStream* __os) const +{ + __os->writeTypeId(ice_staticId()); + __os->startWriteSlice(); + prescription.__write(__os); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest::__write(__os); +#else + ::Ehr::ThirdPartyRequest::__write(__os); +#endif +} + +void +Ehr::CreatePrescriptionRequest::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->readTypeId(myId); + } + __is->startReadSlice(); + prescription.__read(__is); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest::__read(__is, true); +#else + ::Ehr::ThirdPartyRequest::__read(__is, true); +#endif +} + +void +Ehr::CreatePrescriptionRequest::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeTypeId(ice_staticId()); + __outS->startSlice(); + ::Ehr::ice_writeEncryptedDocument(__outS, prescription); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest::__write(__outS); +#else + ::Ehr::ThirdPartyRequest::__write(__outS); +#endif +} + +void +Ehr::CreatePrescriptionRequest::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readTypeId(); + } + __inS->startSlice(); + ::Ehr::ice_readEncryptedDocument(__inS, prescription); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest::__read(__inS, true); +#else + ::Ehr::ThirdPartyRequest::__read(__inS, true); +#endif +} + +class __F__Ehr__CreatePrescriptionRequest : public ::Ice::ObjectFactory +{ +public: + + virtual ::Ice::ObjectPtr + create(const ::std::string& type) + { + assert(type == ::Ehr::CreatePrescriptionRequest::ice_staticId()); + return new ::Ehr::CreatePrescriptionRequest; + } + + virtual void + destroy() + { + } +}; + +static ::Ice::ObjectFactoryPtr __F__Ehr__CreatePrescriptionRequest_Ptr = new __F__Ehr__CreatePrescriptionRequest; + +const ::Ice::ObjectFactoryPtr& +Ehr::CreatePrescriptionRequest::ice_factory() +{ + return __F__Ehr__CreatePrescriptionRequest_Ptr; +} + +class __F__Ehr__CreatePrescriptionRequest__Init +{ +public: + + __F__Ehr__CreatePrescriptionRequest__Init() + { + ::IceInternal::factoryTable->addObjectFactory(::Ehr::CreatePrescriptionRequest::ice_staticId(), ::Ehr::CreatePrescriptionRequest::ice_factory()); + } + + ~__F__Ehr__CreatePrescriptionRequest__Init() + { + ::IceInternal::factoryTable->removeObjectFactory(::Ehr::CreatePrescriptionRequest::ice_staticId()); + } +}; + +static __F__Ehr__CreatePrescriptionRequest__Init __F__Ehr__CreatePrescriptionRequest__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__CreatePrescriptionRequest__initializer() {} } +#endif + +void +Ehr::__patch__CreatePrescriptionRequestPtr(void* __addr, ::Ice::ObjectPtr& v) +{ + ::Ehr::CreatePrescriptionRequestPtr* p = static_cast< ::Ehr::CreatePrescriptionRequestPtr*>(__addr); + assert(p); + *p = ::Ehr::CreatePrescriptionRequestPtr::dynamicCast(v); + if(v && !*p) + { + IceInternal::Ex::throwUOE(::Ehr::CreatePrescriptionRequest::ice_staticId(), v->ice_id()); + } +} + +bool +Ehr::operator==(const ::Ehr::CreatePrescriptionRequest& l, const ::Ehr::CreatePrescriptionRequest& r) +{ + return static_cast(l) == static_cast(r); +} + +bool +Ehr::operator<(const ::Ehr::CreatePrescriptionRequest& l, const ::Ehr::CreatePrescriptionRequest& r) +{ + return static_cast(l) < static_cast(r); +} + +Ehr::ConsumePrescriptionRequest::ConsumePrescriptionRequest(const ::Ehr::AccountIdentifier& __ice_requestor, const ::Ehr::Timestamp& __ice_when, const ::Ehr::AccountIdentifier& __ice_owner, ::Ice::Long __ice_prescriptionId, const ::Ehr::EncryptedDocument& __ice_consumedPrescription) : +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request(__ice_requestor, __ice_when) +#else + ::Ehr::Request(__ice_requestor, __ice_when) +#endif +, +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest(__ice_requestor, __ice_when, __ice_owner) +#else + ::Ehr::ThirdPartyRequest(__ice_requestor, __ice_when, __ice_owner) +#endif +, + prescriptionId(__ice_prescriptionId), + consumedPrescription(__ice_consumedPrescription) +{ +} + +::Ice::ObjectPtr +Ehr::ConsumePrescriptionRequest::ice_clone() const +{ + ::Ehr::ConsumePrescriptionRequestPtr __p = new ::Ehr::ConsumePrescriptionRequest(*this); + return __p; +} + +static const ::std::string __Ehr__ConsumePrescriptionRequest_ids[4] = +{ + "::Ehr::ConsumePrescriptionRequest", + "::Ehr::Request", + "::Ehr::ThirdPartyRequest", + "::Ice::Object" +}; + +bool +Ehr::ConsumePrescriptionRequest::ice_isA(const ::std::string& _s, const ::Ice::Current&) const +{ + return ::std::binary_search(__Ehr__ConsumePrescriptionRequest_ids, __Ehr__ConsumePrescriptionRequest_ids + 4, _s); +} + +::std::vector< ::std::string> +Ehr::ConsumePrescriptionRequest::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&__Ehr__ConsumePrescriptionRequest_ids[0], &__Ehr__ConsumePrescriptionRequest_ids[4]); +} + +const ::std::string& +Ehr::ConsumePrescriptionRequest::ice_id(const ::Ice::Current&) const +{ + return __Ehr__ConsumePrescriptionRequest_ids[0]; +} + +const ::std::string& +Ehr::ConsumePrescriptionRequest::ice_staticId() +{ + return __Ehr__ConsumePrescriptionRequest_ids[0]; +} + +void +Ehr::ConsumePrescriptionRequest::__write(::IceInternal::BasicStream* __os) const +{ + __os->writeTypeId(ice_staticId()); + __os->startWriteSlice(); + __os->write(prescriptionId); + consumedPrescription.__write(__os); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest::__write(__os); +#else + ::Ehr::ThirdPartyRequest::__write(__os); +#endif +} + +void +Ehr::ConsumePrescriptionRequest::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->readTypeId(myId); + } + __is->startReadSlice(); + __is->read(prescriptionId); + consumedPrescription.__read(__is); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest::__read(__is, true); +#else + ::Ehr::ThirdPartyRequest::__read(__is, true); +#endif +} + +void +Ehr::ConsumePrescriptionRequest::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeTypeId(ice_staticId()); + __outS->startSlice(); + __outS->writeLong(prescriptionId); + ::Ehr::ice_writeEncryptedDocument(__outS, consumedPrescription); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest::__write(__outS); +#else + ::Ehr::ThirdPartyRequest::__write(__outS); +#endif +} + +void +Ehr::ConsumePrescriptionRequest::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readTypeId(); + } + __inS->startSlice(); + prescriptionId = __inS->readLong(); + ::Ehr::ice_readEncryptedDocument(__inS, consumedPrescription); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest::__read(__inS, true); +#else + ::Ehr::ThirdPartyRequest::__read(__inS, true); +#endif +} + +class __F__Ehr__ConsumePrescriptionRequest : public ::Ice::ObjectFactory +{ +public: + + virtual ::Ice::ObjectPtr + create(const ::std::string& type) + { + assert(type == ::Ehr::ConsumePrescriptionRequest::ice_staticId()); + return new ::Ehr::ConsumePrescriptionRequest; + } + + virtual void + destroy() + { + } +}; + +static ::Ice::ObjectFactoryPtr __F__Ehr__ConsumePrescriptionRequest_Ptr = new __F__Ehr__ConsumePrescriptionRequest; + +const ::Ice::ObjectFactoryPtr& +Ehr::ConsumePrescriptionRequest::ice_factory() +{ + return __F__Ehr__ConsumePrescriptionRequest_Ptr; +} + +class __F__Ehr__ConsumePrescriptionRequest__Init +{ +public: + + __F__Ehr__ConsumePrescriptionRequest__Init() + { + ::IceInternal::factoryTable->addObjectFactory(::Ehr::ConsumePrescriptionRequest::ice_staticId(), ::Ehr::ConsumePrescriptionRequest::ice_factory()); + } + + ~__F__Ehr__ConsumePrescriptionRequest__Init() + { + ::IceInternal::factoryTable->removeObjectFactory(::Ehr::ConsumePrescriptionRequest::ice_staticId()); + } +}; + +static __F__Ehr__ConsumePrescriptionRequest__Init __F__Ehr__ConsumePrescriptionRequest__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__ConsumePrescriptionRequest__initializer() {} } +#endif + +void +Ehr::__patch__ConsumePrescriptionRequestPtr(void* __addr, ::Ice::ObjectPtr& v) +{ + ::Ehr::ConsumePrescriptionRequestPtr* p = static_cast< ::Ehr::ConsumePrescriptionRequestPtr*>(__addr); + assert(p); + *p = ::Ehr::ConsumePrescriptionRequestPtr::dynamicCast(v); + if(v && !*p) + { + IceInternal::Ex::throwUOE(::Ehr::ConsumePrescriptionRequest::ice_staticId(), v->ice_id()); + } +} + +bool +Ehr::operator==(const ::Ehr::ConsumePrescriptionRequest& l, const ::Ehr::ConsumePrescriptionRequest& r) +{ + return static_cast(l) == static_cast(r); +} + +bool +Ehr::operator<(const ::Ehr::ConsumePrescriptionRequest& l, const ::Ehr::ConsumePrescriptionRequest& r) +{ + return static_cast(l) < static_cast(r); +} + +Ehr::ListDocumentsRequest::ListDocumentsRequest(const ::Ehr::AccountIdentifier& __ice_requestor, const ::Ehr::Timestamp& __ice_when, const ::Ehr::AccountIdentifier& __ice_owner) : +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request(__ice_requestor, __ice_when) +#else + ::Ehr::Request(__ice_requestor, __ice_when) +#endif +, +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest(__ice_requestor, __ice_when, __ice_owner) +#else + ::Ehr::ThirdPartyRequest(__ice_requestor, __ice_when, __ice_owner) +#endif + +{ +} + +::Ice::ObjectPtr +Ehr::ListDocumentsRequest::ice_clone() const +{ + ::Ehr::ListDocumentsRequestPtr __p = new ::Ehr::ListDocumentsRequest(*this); + return __p; +} + +static const ::std::string __Ehr__ListDocumentsRequest_ids[4] = +{ + "::Ehr::ListDocumentsRequest", + "::Ehr::Request", + "::Ehr::ThirdPartyRequest", + "::Ice::Object" +}; + +bool +Ehr::ListDocumentsRequest::ice_isA(const ::std::string& _s, const ::Ice::Current&) const +{ + return ::std::binary_search(__Ehr__ListDocumentsRequest_ids, __Ehr__ListDocumentsRequest_ids + 4, _s); +} + +::std::vector< ::std::string> +Ehr::ListDocumentsRequest::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&__Ehr__ListDocumentsRequest_ids[0], &__Ehr__ListDocumentsRequest_ids[4]); +} + +const ::std::string& +Ehr::ListDocumentsRequest::ice_id(const ::Ice::Current&) const +{ + return __Ehr__ListDocumentsRequest_ids[0]; +} + +const ::std::string& +Ehr::ListDocumentsRequest::ice_staticId() +{ + return __Ehr__ListDocumentsRequest_ids[0]; +} + +void +Ehr::ListDocumentsRequest::__write(::IceInternal::BasicStream* __os) const +{ + __os->writeTypeId(ice_staticId()); + __os->startWriteSlice(); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest::__write(__os); +#else + ::Ehr::ThirdPartyRequest::__write(__os); +#endif +} + +void +Ehr::ListDocumentsRequest::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->readTypeId(myId); + } + __is->startReadSlice(); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest::__read(__is, true); +#else + ::Ehr::ThirdPartyRequest::__read(__is, true); +#endif +} + +void +Ehr::ListDocumentsRequest::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeTypeId(ice_staticId()); + __outS->startSlice(); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest::__write(__outS); +#else + ::Ehr::ThirdPartyRequest::__write(__outS); +#endif +} + +void +Ehr::ListDocumentsRequest::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readTypeId(); + } + __inS->startSlice(); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest::__read(__inS, true); +#else + ::Ehr::ThirdPartyRequest::__read(__inS, true); +#endif +} + +class __F__Ehr__ListDocumentsRequest : public ::Ice::ObjectFactory +{ +public: + + virtual ::Ice::ObjectPtr + create(const ::std::string& type) + { + assert(type == ::Ehr::ListDocumentsRequest::ice_staticId()); + return new ::Ehr::ListDocumentsRequest; + } + + virtual void + destroy() + { + } +}; + +static ::Ice::ObjectFactoryPtr __F__Ehr__ListDocumentsRequest_Ptr = new __F__Ehr__ListDocumentsRequest; + +const ::Ice::ObjectFactoryPtr& +Ehr::ListDocumentsRequest::ice_factory() +{ + return __F__Ehr__ListDocumentsRequest_Ptr; +} + +class __F__Ehr__ListDocumentsRequest__Init +{ +public: + + __F__Ehr__ListDocumentsRequest__Init() + { + ::IceInternal::factoryTable->addObjectFactory(::Ehr::ListDocumentsRequest::ice_staticId(), ::Ehr::ListDocumentsRequest::ice_factory()); + } + + ~__F__Ehr__ListDocumentsRequest__Init() + { + ::IceInternal::factoryTable->removeObjectFactory(::Ehr::ListDocumentsRequest::ice_staticId()); + } +}; + +static __F__Ehr__ListDocumentsRequest__Init __F__Ehr__ListDocumentsRequest__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__ListDocumentsRequest__initializer() {} } +#endif + +void +Ehr::__patch__ListDocumentsRequestPtr(void* __addr, ::Ice::ObjectPtr& v) +{ + ::Ehr::ListDocumentsRequestPtr* p = static_cast< ::Ehr::ListDocumentsRequestPtr*>(__addr); + assert(p); + *p = ::Ehr::ListDocumentsRequestPtr::dynamicCast(v); + if(v && !*p) + { + IceInternal::Ex::throwUOE(::Ehr::ListDocumentsRequest::ice_staticId(), v->ice_id()); + } +} + +bool +Ehr::operator==(const ::Ehr::ListDocumentsRequest& l, const ::Ehr::ListDocumentsRequest& r) +{ + return static_cast(l) == static_cast(r); +} + +bool +Ehr::operator<(const ::Ehr::ListDocumentsRequest& l, const ::Ehr::ListDocumentsRequest& r) +{ + return static_cast(l) < static_cast(r); +} + +Ehr::FindDocumentsRequest::FindDocumentsRequest(const ::Ehr::AccountIdentifier& __ice_requestor, const ::Ehr::Timestamp& __ice_when, const ::Ehr::AccountIdentifier& __ice_owner, bool __ice_hasFrom, const ::Ehr::Timestamp& __ice_from, bool __ice_hasTill, const ::Ehr::Timestamp& __ice_till, ::Ehr::DocumentType __ice_type, ::Ice::Long __ice_documentId) : +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request(__ice_requestor, __ice_when) +#else + ::Ehr::Request(__ice_requestor, __ice_when) +#endif +, +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest(__ice_requestor, __ice_when, __ice_owner) +#else + ::Ehr::ThirdPartyRequest(__ice_requestor, __ice_when, __ice_owner) +#endif +, + hasFrom(__ice_hasFrom), + from(__ice_from), + hasTill(__ice_hasTill), + till(__ice_till), + type(__ice_type), + documentId(__ice_documentId) +{ +} + +::Ice::ObjectPtr +Ehr::FindDocumentsRequest::ice_clone() const +{ + ::Ehr::FindDocumentsRequestPtr __p = new ::Ehr::FindDocumentsRequest(*this); + return __p; +} + +static const ::std::string __Ehr__FindDocumentsRequest_ids[4] = +{ + "::Ehr::FindDocumentsRequest", + "::Ehr::Request", + "::Ehr::ThirdPartyRequest", + "::Ice::Object" +}; + +bool +Ehr::FindDocumentsRequest::ice_isA(const ::std::string& _s, const ::Ice::Current&) const +{ + return ::std::binary_search(__Ehr__FindDocumentsRequest_ids, __Ehr__FindDocumentsRequest_ids + 4, _s); +} + +::std::vector< ::std::string> +Ehr::FindDocumentsRequest::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&__Ehr__FindDocumentsRequest_ids[0], &__Ehr__FindDocumentsRequest_ids[4]); +} + +const ::std::string& +Ehr::FindDocumentsRequest::ice_id(const ::Ice::Current&) const +{ + return __Ehr__FindDocumentsRequest_ids[0]; +} + +const ::std::string& +Ehr::FindDocumentsRequest::ice_staticId() +{ + return __Ehr__FindDocumentsRequest_ids[0]; +} + +void +Ehr::FindDocumentsRequest::__write(::IceInternal::BasicStream* __os) const +{ + __os->writeTypeId(ice_staticId()); + __os->startWriteSlice(); + __os->write(hasFrom); + from.__write(__os); + __os->write(hasTill); + till.__write(__os); + ::Ehr::__write(__os, type); + __os->write(documentId); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest::__write(__os); +#else + ::Ehr::ThirdPartyRequest::__write(__os); +#endif +} + +void +Ehr::FindDocumentsRequest::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->readTypeId(myId); + } + __is->startReadSlice(); + __is->read(hasFrom); + from.__read(__is); + __is->read(hasTill); + till.__read(__is); + ::Ehr::__read(__is, type); + __is->read(documentId); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest::__read(__is, true); +#else + ::Ehr::ThirdPartyRequest::__read(__is, true); +#endif +} + +void +Ehr::FindDocumentsRequest::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeTypeId(ice_staticId()); + __outS->startSlice(); + __outS->writeBool(hasFrom); + ::Ehr::ice_writeTimestamp(__outS, from); + __outS->writeBool(hasTill); + ::Ehr::ice_writeTimestamp(__outS, till); + ::Ehr::ice_writeDocumentType(__outS, type); + __outS->writeLong(documentId); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest::__write(__outS); +#else + ::Ehr::ThirdPartyRequest::__write(__outS); +#endif +} + +void +Ehr::FindDocumentsRequest::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readTypeId(); + } + __inS->startSlice(); + hasFrom = __inS->readBool(); + ::Ehr::ice_readTimestamp(__inS, from); + hasTill = __inS->readBool(); + ::Ehr::ice_readTimestamp(__inS, till); + ::Ehr::ice_readDocumentType(__inS, type); + documentId = __inS->readLong(); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + ThirdPartyRequest::__read(__inS, true); +#else + ::Ehr::ThirdPartyRequest::__read(__inS, true); +#endif +} + +class __F__Ehr__FindDocumentsRequest : public ::Ice::ObjectFactory +{ +public: + + virtual ::Ice::ObjectPtr + create(const ::std::string& type) + { + assert(type == ::Ehr::FindDocumentsRequest::ice_staticId()); + return new ::Ehr::FindDocumentsRequest; + } + + virtual void + destroy() + { + } +}; + +static ::Ice::ObjectFactoryPtr __F__Ehr__FindDocumentsRequest_Ptr = new __F__Ehr__FindDocumentsRequest; + +const ::Ice::ObjectFactoryPtr& +Ehr::FindDocumentsRequest::ice_factory() +{ + return __F__Ehr__FindDocumentsRequest_Ptr; +} + +class __F__Ehr__FindDocumentsRequest__Init +{ +public: + + __F__Ehr__FindDocumentsRequest__Init() + { + ::IceInternal::factoryTable->addObjectFactory(::Ehr::FindDocumentsRequest::ice_staticId(), ::Ehr::FindDocumentsRequest::ice_factory()); + } + + ~__F__Ehr__FindDocumentsRequest__Init() + { + ::IceInternal::factoryTable->removeObjectFactory(::Ehr::FindDocumentsRequest::ice_staticId()); + } +}; + +static __F__Ehr__FindDocumentsRequest__Init __F__Ehr__FindDocumentsRequest__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__FindDocumentsRequest__initializer() {} } +#endif + +void +Ehr::__patch__FindDocumentsRequestPtr(void* __addr, ::Ice::ObjectPtr& v) +{ + ::Ehr::FindDocumentsRequestPtr* p = static_cast< ::Ehr::FindDocumentsRequestPtr*>(__addr); + assert(p); + *p = ::Ehr::FindDocumentsRequestPtr::dynamicCast(v); + if(v && !*p) + { + IceInternal::Ex::throwUOE(::Ehr::FindDocumentsRequest::ice_staticId(), v->ice_id()); + } +} + +bool +Ehr::operator==(const ::Ehr::FindDocumentsRequest& l, const ::Ehr::FindDocumentsRequest& r) +{ + return static_cast(l) == static_cast(r); +} + +bool +Ehr::operator<(const ::Ehr::FindDocumentsRequest& l, const ::Ehr::FindDocumentsRequest& r) +{ + return static_cast(l) < static_cast(r); +} + +Ehr::CreatePermissionRequest::CreatePermissionRequest(const ::Ehr::AccountIdentifier& __ice_requestor, const ::Ehr::Timestamp& __ice_when, ::Ice::Long __ice_documentId, const ::Ehr::AccountIdentifier& __ice_account, ::Ehr::AccessType __ice_access) : +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request(__ice_requestor, __ice_when) +#else + ::Ehr::Request(__ice_requestor, __ice_when) +#endif +, + documentId(__ice_documentId), + account(__ice_account), + access(__ice_access) +{ +} + +::Ice::ObjectPtr +Ehr::CreatePermissionRequest::ice_clone() const +{ + ::Ehr::CreatePermissionRequestPtr __p = new ::Ehr::CreatePermissionRequest(*this); + return __p; +} + +static const ::std::string __Ehr__CreatePermissionRequest_ids[3] = +{ + "::Ehr::CreatePermissionRequest", + "::Ehr::Request", + "::Ice::Object" +}; + +bool +Ehr::CreatePermissionRequest::ice_isA(const ::std::string& _s, const ::Ice::Current&) const +{ + return ::std::binary_search(__Ehr__CreatePermissionRequest_ids, __Ehr__CreatePermissionRequest_ids + 3, _s); +} + +::std::vector< ::std::string> +Ehr::CreatePermissionRequest::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&__Ehr__CreatePermissionRequest_ids[0], &__Ehr__CreatePermissionRequest_ids[3]); +} + +const ::std::string& +Ehr::CreatePermissionRequest::ice_id(const ::Ice::Current&) const +{ + return __Ehr__CreatePermissionRequest_ids[0]; +} + +const ::std::string& +Ehr::CreatePermissionRequest::ice_staticId() +{ + return __Ehr__CreatePermissionRequest_ids[0]; +} + +void +Ehr::CreatePermissionRequest::__write(::IceInternal::BasicStream* __os) const +{ + __os->writeTypeId(ice_staticId()); + __os->startWriteSlice(); + __os->write(documentId); + account.__write(__os); + ::Ehr::__write(__os, access); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__write(__os); +#else + ::Ehr::Request::__write(__os); +#endif +} + +void +Ehr::CreatePermissionRequest::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->readTypeId(myId); + } + __is->startReadSlice(); + __is->read(documentId); + account.__read(__is); + ::Ehr::__read(__is, access); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__read(__is, true); +#else + ::Ehr::Request::__read(__is, true); +#endif +} + +void +Ehr::CreatePermissionRequest::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeTypeId(ice_staticId()); + __outS->startSlice(); + __outS->writeLong(documentId); + ::Ehr::ice_writeAccountIdentifier(__outS, account); + ::Ehr::ice_writeAccessType(__outS, access); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__write(__outS); +#else + ::Ehr::Request::__write(__outS); +#endif +} + +void +Ehr::CreatePermissionRequest::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readTypeId(); + } + __inS->startSlice(); + documentId = __inS->readLong(); + ::Ehr::ice_readAccountIdentifier(__inS, account); + ::Ehr::ice_readAccessType(__inS, access); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__read(__inS, true); +#else + ::Ehr::Request::__read(__inS, true); +#endif +} + +class __F__Ehr__CreatePermissionRequest : public ::Ice::ObjectFactory +{ +public: + + virtual ::Ice::ObjectPtr + create(const ::std::string& type) + { + assert(type == ::Ehr::CreatePermissionRequest::ice_staticId()); + return new ::Ehr::CreatePermissionRequest; + } + + virtual void + destroy() + { + } +}; + +static ::Ice::ObjectFactoryPtr __F__Ehr__CreatePermissionRequest_Ptr = new __F__Ehr__CreatePermissionRequest; + +const ::Ice::ObjectFactoryPtr& +Ehr::CreatePermissionRequest::ice_factory() +{ + return __F__Ehr__CreatePermissionRequest_Ptr; +} + +class __F__Ehr__CreatePermissionRequest__Init +{ +public: + + __F__Ehr__CreatePermissionRequest__Init() + { + ::IceInternal::factoryTable->addObjectFactory(::Ehr::CreatePermissionRequest::ice_staticId(), ::Ehr::CreatePermissionRequest::ice_factory()); + } + + ~__F__Ehr__CreatePermissionRequest__Init() + { + ::IceInternal::factoryTable->removeObjectFactory(::Ehr::CreatePermissionRequest::ice_staticId()); + } +}; + +static __F__Ehr__CreatePermissionRequest__Init __F__Ehr__CreatePermissionRequest__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__CreatePermissionRequest__initializer() {} } +#endif + +void +Ehr::__patch__CreatePermissionRequestPtr(void* __addr, ::Ice::ObjectPtr& v) +{ + ::Ehr::CreatePermissionRequestPtr* p = static_cast< ::Ehr::CreatePermissionRequestPtr*>(__addr); + assert(p); + *p = ::Ehr::CreatePermissionRequestPtr::dynamicCast(v); + if(v && !*p) + { + IceInternal::Ex::throwUOE(::Ehr::CreatePermissionRequest::ice_staticId(), v->ice_id()); + } +} + +bool +Ehr::operator==(const ::Ehr::CreatePermissionRequest& l, const ::Ehr::CreatePermissionRequest& r) +{ + return static_cast(l) == static_cast(r); +} + +bool +Ehr::operator<(const ::Ehr::CreatePermissionRequest& l, const ::Ehr::CreatePermissionRequest& r) +{ + return static_cast(l) < static_cast(r); +} + +Ehr::SetDefaultAccessRequest::SetDefaultAccessRequest(const ::Ehr::AccountIdentifier& __ice_requestor, const ::Ehr::Timestamp& __ice_when, ::Ice::Long __ice_documentId, ::Ehr::AccessType __ice_access) : +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request(__ice_requestor, __ice_when) +#else + ::Ehr::Request(__ice_requestor, __ice_when) +#endif +, + documentId(__ice_documentId), + access(__ice_access) +{ +} + +::Ice::ObjectPtr +Ehr::SetDefaultAccessRequest::ice_clone() const +{ + ::Ehr::SetDefaultAccessRequestPtr __p = new ::Ehr::SetDefaultAccessRequest(*this); + return __p; +} + +static const ::std::string __Ehr__SetDefaultAccessRequest_ids[3] = +{ + "::Ehr::Request", + "::Ehr::SetDefaultAccessRequest", + "::Ice::Object" +}; + +bool +Ehr::SetDefaultAccessRequest::ice_isA(const ::std::string& _s, const ::Ice::Current&) const +{ + return ::std::binary_search(__Ehr__SetDefaultAccessRequest_ids, __Ehr__SetDefaultAccessRequest_ids + 3, _s); +} + +::std::vector< ::std::string> +Ehr::SetDefaultAccessRequest::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&__Ehr__SetDefaultAccessRequest_ids[0], &__Ehr__SetDefaultAccessRequest_ids[3]); +} + +const ::std::string& +Ehr::SetDefaultAccessRequest::ice_id(const ::Ice::Current&) const +{ + return __Ehr__SetDefaultAccessRequest_ids[1]; +} + +const ::std::string& +Ehr::SetDefaultAccessRequest::ice_staticId() +{ + return __Ehr__SetDefaultAccessRequest_ids[1]; +} + +void +Ehr::SetDefaultAccessRequest::__write(::IceInternal::BasicStream* __os) const +{ + __os->writeTypeId(ice_staticId()); + __os->startWriteSlice(); + __os->write(documentId); + ::Ehr::__write(__os, access); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__write(__os); +#else + ::Ehr::Request::__write(__os); +#endif +} + +void +Ehr::SetDefaultAccessRequest::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->readTypeId(myId); + } + __is->startReadSlice(); + __is->read(documentId); + ::Ehr::__read(__is, access); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__read(__is, true); +#else + ::Ehr::Request::__read(__is, true); +#endif +} + +void +Ehr::SetDefaultAccessRequest::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeTypeId(ice_staticId()); + __outS->startSlice(); + __outS->writeLong(documentId); + ::Ehr::ice_writeAccessType(__outS, access); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__write(__outS); +#else + ::Ehr::Request::__write(__outS); +#endif +} + +void +Ehr::SetDefaultAccessRequest::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readTypeId(); + } + __inS->startSlice(); + documentId = __inS->readLong(); + ::Ehr::ice_readAccessType(__inS, access); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__read(__inS, true); +#else + ::Ehr::Request::__read(__inS, true); +#endif +} + +class __F__Ehr__SetDefaultAccessRequest : public ::Ice::ObjectFactory +{ +public: + + virtual ::Ice::ObjectPtr + create(const ::std::string& type) + { + assert(type == ::Ehr::SetDefaultAccessRequest::ice_staticId()); + return new ::Ehr::SetDefaultAccessRequest; + } + + virtual void + destroy() + { + } +}; + +static ::Ice::ObjectFactoryPtr __F__Ehr__SetDefaultAccessRequest_Ptr = new __F__Ehr__SetDefaultAccessRequest; + +const ::Ice::ObjectFactoryPtr& +Ehr::SetDefaultAccessRequest::ice_factory() +{ + return __F__Ehr__SetDefaultAccessRequest_Ptr; +} + +class __F__Ehr__SetDefaultAccessRequest__Init +{ +public: + + __F__Ehr__SetDefaultAccessRequest__Init() + { + ::IceInternal::factoryTable->addObjectFactory(::Ehr::SetDefaultAccessRequest::ice_staticId(), ::Ehr::SetDefaultAccessRequest::ice_factory()); + } + + ~__F__Ehr__SetDefaultAccessRequest__Init() + { + ::IceInternal::factoryTable->removeObjectFactory(::Ehr::SetDefaultAccessRequest::ice_staticId()); + } +}; + +static __F__Ehr__SetDefaultAccessRequest__Init __F__Ehr__SetDefaultAccessRequest__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__SetDefaultAccessRequest__initializer() {} } +#endif + +void +Ehr::__patch__SetDefaultAccessRequestPtr(void* __addr, ::Ice::ObjectPtr& v) +{ + ::Ehr::SetDefaultAccessRequestPtr* p = static_cast< ::Ehr::SetDefaultAccessRequestPtr*>(__addr); + assert(p); + *p = ::Ehr::SetDefaultAccessRequestPtr::dynamicCast(v); + if(v && !*p) + { + IceInternal::Ex::throwUOE(::Ehr::SetDefaultAccessRequest::ice_staticId(), v->ice_id()); + } +} + +bool +Ehr::operator==(const ::Ehr::SetDefaultAccessRequest& l, const ::Ehr::SetDefaultAccessRequest& r) +{ + return static_cast(l) == static_cast(r); +} + +bool +Ehr::operator<(const ::Ehr::SetDefaultAccessRequest& l, const ::Ehr::SetDefaultAccessRequest& r) +{ + return static_cast(l) < static_cast(r); +} + +Ehr::ListPermissionsRequest::ListPermissionsRequest(const ::Ehr::AccountIdentifier& __ice_requestor, const ::Ehr::Timestamp& __ice_when, ::Ice::Long __ice_documentId) : +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request(__ice_requestor, __ice_when) +#else + ::Ehr::Request(__ice_requestor, __ice_when) +#endif +, + documentId(__ice_documentId) +{ +} + +::Ice::ObjectPtr +Ehr::ListPermissionsRequest::ice_clone() const +{ + ::Ehr::ListPermissionsRequestPtr __p = new ::Ehr::ListPermissionsRequest(*this); + return __p; +} + +static const ::std::string __Ehr__ListPermissionsRequest_ids[3] = +{ + "::Ehr::ListPermissionsRequest", + "::Ehr::Request", + "::Ice::Object" +}; + +bool +Ehr::ListPermissionsRequest::ice_isA(const ::std::string& _s, const ::Ice::Current&) const +{ + return ::std::binary_search(__Ehr__ListPermissionsRequest_ids, __Ehr__ListPermissionsRequest_ids + 3, _s); +} + +::std::vector< ::std::string> +Ehr::ListPermissionsRequest::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&__Ehr__ListPermissionsRequest_ids[0], &__Ehr__ListPermissionsRequest_ids[3]); +} + +const ::std::string& +Ehr::ListPermissionsRequest::ice_id(const ::Ice::Current&) const +{ + return __Ehr__ListPermissionsRequest_ids[0]; +} + +const ::std::string& +Ehr::ListPermissionsRequest::ice_staticId() +{ + return __Ehr__ListPermissionsRequest_ids[0]; +} + +void +Ehr::ListPermissionsRequest::__write(::IceInternal::BasicStream* __os) const +{ + __os->writeTypeId(ice_staticId()); + __os->startWriteSlice(); + __os->write(documentId); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__write(__os); +#else + ::Ehr::Request::__write(__os); +#endif +} + +void +Ehr::ListPermissionsRequest::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->readTypeId(myId); + } + __is->startReadSlice(); + __is->read(documentId); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__read(__is, true); +#else + ::Ehr::Request::__read(__is, true); +#endif +} + +void +Ehr::ListPermissionsRequest::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeTypeId(ice_staticId()); + __outS->startSlice(); + __outS->writeLong(documentId); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__write(__outS); +#else + ::Ehr::Request::__write(__outS); +#endif +} + +void +Ehr::ListPermissionsRequest::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readTypeId(); + } + __inS->startSlice(); + documentId = __inS->readLong(); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__read(__inS, true); +#else + ::Ehr::Request::__read(__inS, true); +#endif +} + +class __F__Ehr__ListPermissionsRequest : public ::Ice::ObjectFactory +{ +public: + + virtual ::Ice::ObjectPtr + create(const ::std::string& type) + { + assert(type == ::Ehr::ListPermissionsRequest::ice_staticId()); + return new ::Ehr::ListPermissionsRequest; + } + + virtual void + destroy() + { + } +}; + +static ::Ice::ObjectFactoryPtr __F__Ehr__ListPermissionsRequest_Ptr = new __F__Ehr__ListPermissionsRequest; + +const ::Ice::ObjectFactoryPtr& +Ehr::ListPermissionsRequest::ice_factory() +{ + return __F__Ehr__ListPermissionsRequest_Ptr; +} + +class __F__Ehr__ListPermissionsRequest__Init +{ +public: + + __F__Ehr__ListPermissionsRequest__Init() + { + ::IceInternal::factoryTable->addObjectFactory(::Ehr::ListPermissionsRequest::ice_staticId(), ::Ehr::ListPermissionsRequest::ice_factory()); + } + + ~__F__Ehr__ListPermissionsRequest__Init() + { + ::IceInternal::factoryTable->removeObjectFactory(::Ehr::ListPermissionsRequest::ice_staticId()); + } +}; + +static __F__Ehr__ListPermissionsRequest__Init __F__Ehr__ListPermissionsRequest__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__ListPermissionsRequest__initializer() {} } +#endif + +void +Ehr::__patch__ListPermissionsRequestPtr(void* __addr, ::Ice::ObjectPtr& v) +{ + ::Ehr::ListPermissionsRequestPtr* p = static_cast< ::Ehr::ListPermissionsRequestPtr*>(__addr); + assert(p); + *p = ::Ehr::ListPermissionsRequestPtr::dynamicCast(v); + if(v && !*p) + { + IceInternal::Ex::throwUOE(::Ehr::ListPermissionsRequest::ice_staticId(), v->ice_id()); + } +} + +bool +Ehr::operator==(const ::Ehr::ListPermissionsRequest& l, const ::Ehr::ListPermissionsRequest& r) +{ + return static_cast(l) == static_cast(r); +} + +bool +Ehr::operator<(const ::Ehr::ListPermissionsRequest& l, const ::Ehr::ListPermissionsRequest& r) +{ + return static_cast(l) < static_cast(r); +} + +Ehr::RemovePermissionRequest::RemovePermissionRequest(const ::Ehr::AccountIdentifier& __ice_requestor, const ::Ehr::Timestamp& __ice_when, ::Ice::Long __ice_documentId, ::Ice::Long __ice_permissionId) : +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request(__ice_requestor, __ice_when) +#else + ::Ehr::Request(__ice_requestor, __ice_when) +#endif +, + documentId(__ice_documentId), + permissionId(__ice_permissionId) +{ +} + +::Ice::ObjectPtr +Ehr::RemovePermissionRequest::ice_clone() const +{ + ::Ehr::RemovePermissionRequestPtr __p = new ::Ehr::RemovePermissionRequest(*this); + return __p; +} + +static const ::std::string __Ehr__RemovePermissionRequest_ids[3] = +{ + "::Ehr::RemovePermissionRequest", + "::Ehr::Request", + "::Ice::Object" +}; + +bool +Ehr::RemovePermissionRequest::ice_isA(const ::std::string& _s, const ::Ice::Current&) const +{ + return ::std::binary_search(__Ehr__RemovePermissionRequest_ids, __Ehr__RemovePermissionRequest_ids + 3, _s); +} + +::std::vector< ::std::string> +Ehr::RemovePermissionRequest::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&__Ehr__RemovePermissionRequest_ids[0], &__Ehr__RemovePermissionRequest_ids[3]); +} + +const ::std::string& +Ehr::RemovePermissionRequest::ice_id(const ::Ice::Current&) const +{ + return __Ehr__RemovePermissionRequest_ids[0]; +} + +const ::std::string& +Ehr::RemovePermissionRequest::ice_staticId() +{ + return __Ehr__RemovePermissionRequest_ids[0]; +} + +void +Ehr::RemovePermissionRequest::__write(::IceInternal::BasicStream* __os) const +{ + __os->writeTypeId(ice_staticId()); + __os->startWriteSlice(); + __os->write(documentId); + __os->write(permissionId); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__write(__os); +#else + ::Ehr::Request::__write(__os); +#endif +} + +void +Ehr::RemovePermissionRequest::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->readTypeId(myId); + } + __is->startReadSlice(); + __is->read(documentId); + __is->read(permissionId); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__read(__is, true); +#else + ::Ehr::Request::__read(__is, true); +#endif +} + +void +Ehr::RemovePermissionRequest::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeTypeId(ice_staticId()); + __outS->startSlice(); + __outS->writeLong(documentId); + __outS->writeLong(permissionId); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__write(__outS); +#else + ::Ehr::Request::__write(__outS); +#endif +} + +void +Ehr::RemovePermissionRequest::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readTypeId(); + } + __inS->startSlice(); + documentId = __inS->readLong(); + permissionId = __inS->readLong(); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Request::__read(__inS, true); +#else + ::Ehr::Request::__read(__inS, true); +#endif +} + +class __F__Ehr__RemovePermissionRequest : public ::Ice::ObjectFactory +{ +public: + + virtual ::Ice::ObjectPtr + create(const ::std::string& type) + { + assert(type == ::Ehr::RemovePermissionRequest::ice_staticId()); + return new ::Ehr::RemovePermissionRequest; + } + + virtual void + destroy() + { + } +}; + +static ::Ice::ObjectFactoryPtr __F__Ehr__RemovePermissionRequest_Ptr = new __F__Ehr__RemovePermissionRequest; + +const ::Ice::ObjectFactoryPtr& +Ehr::RemovePermissionRequest::ice_factory() +{ + return __F__Ehr__RemovePermissionRequest_Ptr; +} + +class __F__Ehr__RemovePermissionRequest__Init +{ +public: + + __F__Ehr__RemovePermissionRequest__Init() + { + ::IceInternal::factoryTable->addObjectFactory(::Ehr::RemovePermissionRequest::ice_staticId(), ::Ehr::RemovePermissionRequest::ice_factory()); + } + + ~__F__Ehr__RemovePermissionRequest__Init() + { + ::IceInternal::factoryTable->removeObjectFactory(::Ehr::RemovePermissionRequest::ice_staticId()); + } +}; + +static __F__Ehr__RemovePermissionRequest__Init __F__Ehr__RemovePermissionRequest__i; + +#ifdef __APPLE__ +extern "C" { void __F__Ehr__RemovePermissionRequest__initializer() {} } +#endif + +void +Ehr::__patch__RemovePermissionRequestPtr(void* __addr, ::Ice::ObjectPtr& v) +{ + ::Ehr::RemovePermissionRequestPtr* p = static_cast< ::Ehr::RemovePermissionRequestPtr*>(__addr); + assert(p); + *p = ::Ehr::RemovePermissionRequestPtr::dynamicCast(v); + if(v && !*p) + { + IceInternal::Ex::throwUOE(::Ehr::RemovePermissionRequest::ice_staticId(), v->ice_id()); + } +} + +bool +Ehr::operator==(const ::Ehr::RemovePermissionRequest& l, const ::Ehr::RemovePermissionRequest& r) +{ + return static_cast(l) == static_cast(r); +} + +bool +Ehr::operator<(const ::Ehr::RemovePermissionRequest& l, const ::Ehr::RemovePermissionRequest& r) +{ + return static_cast(l) < static_cast(r); +} + +::Ice::ObjectPtr +Ehr::Provider::ice_clone() const +{ + throw ::Ice::CloneNotImplementedException(__FILE__, __LINE__); + return 0; // to avoid a warning with some compilers +} + +static const ::std::string __Ehr__Provider_ids[2] = +{ + "::Ehr::Provider", + "::Ice::Object" +}; + +bool +Ehr::Provider::ice_isA(const ::std::string& _s, const ::Ice::Current&) const +{ + return ::std::binary_search(__Ehr__Provider_ids, __Ehr__Provider_ids + 2, _s); +} + +::std::vector< ::std::string> +Ehr::Provider::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&__Ehr__Provider_ids[0], &__Ehr__Provider_ids[2]); +} + +const ::std::string& +Ehr::Provider::ice_id(const ::Ice::Current&) const +{ + return __Ehr__Provider_ids[0]; +} + +const ::std::string& +Ehr::Provider::ice_staticId() +{ + return __Ehr__Provider_ids[0]; +} + +::Ice::DispatchStatus +Ehr::Provider::___createPrescription(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) +{ + __checkMode(::Ice::Normal, __current.mode); + ::IceInternal::BasicStream* __is = __inS.is(); + __is->startReadEncaps(); + ::Ehr::CreatePrescriptionRequestPtr request; + ::Ehr::Signature requestorSignature; + ::Ehr::Signature ownerSignature; + __is->read(::Ehr::__patch__CreatePrescriptionRequestPtr, &request); + requestorSignature.__read(__is); + ownerSignature.__read(__is); + __is->readPendingObjects(); + __is->endReadEncaps(); + ::IceInternal::BasicStream* __os = __inS.os(); + try + { + createPrescription(request, requestorSignature, ownerSignature, __current); + } + catch(const ::Ehr::EhrException& __ex) + { + __os->write(__ex); + return ::Ice::DispatchUserException; + } + return ::Ice::DispatchOK; +} + +::Ice::DispatchStatus +Ehr::Provider::___consumePrescription(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) +{ + __checkMode(::Ice::Normal, __current.mode); + ::IceInternal::BasicStream* __is = __inS.is(); + __is->startReadEncaps(); + ::Ehr::ConsumePrescriptionRequestPtr request; + ::Ehr::Signature requestorSignature; + ::Ehr::Signature ownerSignature; + __is->read(::Ehr::__patch__ConsumePrescriptionRequestPtr, &request); + requestorSignature.__read(__is); + ownerSignature.__read(__is); + __is->readPendingObjects(); + __is->endReadEncaps(); + ::IceInternal::BasicStream* __os = __inS.os(); + try + { + consumePrescription(request, requestorSignature, ownerSignature, __current); + } + catch(const ::Ehr::EhrException& __ex) + { + __os->write(__ex); + return ::Ice::DispatchUserException; + } + return ::Ice::DispatchOK; +} + +::Ice::DispatchStatus +Ehr::Provider::___listDocuments(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) +{ + __checkMode(::Ice::Normal, __current.mode); + ::IceInternal::BasicStream* __is = __inS.is(); + __is->startReadEncaps(); + ::Ehr::ListDocumentsRequestPtr request; + ::Ehr::Signature requestorSignature; + ::Ehr::Signature ownerSignature; + __is->read(::Ehr::__patch__ListDocumentsRequestPtr, &request); + requestorSignature.__read(__is); + ownerSignature.__read(__is); + __is->readPendingObjects(); + __is->endReadEncaps(); + ::IceInternal::BasicStream* __os = __inS.os(); + try + { + ::Ehr::DocumentList __ret = listDocuments(request, requestorSignature, ownerSignature, __current); + if(__ret.size() == 0) + { + __os->writeSize(0); + } + else + { + ::Ehr::__writeDocumentList(__os, &__ret[0], &__ret[0] + __ret.size()); + } + } + catch(const ::Ehr::EhrException& __ex) + { + __os->write(__ex); + return ::Ice::DispatchUserException; + } + return ::Ice::DispatchOK; +} + +::Ice::DispatchStatus +Ehr::Provider::___findDocuments(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) +{ + __checkMode(::Ice::Normal, __current.mode); + ::IceInternal::BasicStream* __is = __inS.is(); + __is->startReadEncaps(); + ::Ehr::FindDocumentsRequestPtr request; + ::Ehr::Signature requestorSignature; + ::Ehr::Signature ownerSignature; + __is->read(::Ehr::__patch__FindDocumentsRequestPtr, &request); + requestorSignature.__read(__is); + ownerSignature.__read(__is); + __is->readPendingObjects(); + __is->endReadEncaps(); + ::IceInternal::BasicStream* __os = __inS.os(); + try + { + ::Ehr::DocumentList __ret = findDocuments(request, requestorSignature, ownerSignature, __current); + if(__ret.size() == 0) + { + __os->writeSize(0); + } + else + { + ::Ehr::__writeDocumentList(__os, &__ret[0], &__ret[0] + __ret.size()); + } + } + catch(const ::Ehr::EhrException& __ex) + { + __os->write(__ex); + return ::Ice::DispatchUserException; + } + return ::Ice::DispatchOK; +} + +::Ice::DispatchStatus +Ehr::Provider::___setDefaultAccess(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) +{ + __checkMode(::Ice::Normal, __current.mode); + ::IceInternal::BasicStream* __is = __inS.is(); + __is->startReadEncaps(); + ::Ehr::SetDefaultAccessRequestPtr request; + ::Ehr::Signature requestorSignature; + __is->read(::Ehr::__patch__SetDefaultAccessRequestPtr, &request); + requestorSignature.__read(__is); + __is->readPendingObjects(); + __is->endReadEncaps(); + ::IceInternal::BasicStream* __os = __inS.os(); + try + { + setDefaultAccess(request, requestorSignature, __current); + } + catch(const ::Ehr::EhrException& __ex) + { + __os->write(__ex); + return ::Ice::DispatchUserException; + } + return ::Ice::DispatchOK; +} + +::Ice::DispatchStatus +Ehr::Provider::___createPermission(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) +{ + __checkMode(::Ice::Normal, __current.mode); + ::IceInternal::BasicStream* __is = __inS.is(); + __is->startReadEncaps(); + ::Ehr::CreatePermissionRequestPtr request; + ::Ehr::Signature requestorSignature; + __is->read(::Ehr::__patch__CreatePermissionRequestPtr, &request); + requestorSignature.__read(__is); + __is->readPendingObjects(); + __is->endReadEncaps(); + ::IceInternal::BasicStream* __os = __inS.os(); + try + { + createPermission(request, requestorSignature, __current); + } + catch(const ::Ehr::EhrException& __ex) + { + __os->write(__ex); + return ::Ice::DispatchUserException; + } + return ::Ice::DispatchOK; +} + +::Ice::DispatchStatus +Ehr::Provider::___listPermissions(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) +{ + __checkMode(::Ice::Normal, __current.mode); + ::IceInternal::BasicStream* __is = __inS.is(); + __is->startReadEncaps(); + ::Ehr::ListPermissionsRequestPtr request; + ::Ehr::Signature requestorSignature; + __is->read(::Ehr::__patch__ListPermissionsRequestPtr, &request); + requestorSignature.__read(__is); + __is->readPendingObjects(); + __is->endReadEncaps(); + ::IceInternal::BasicStream* __os = __inS.os(); + try + { + ::Ehr::Permissions __ret = listPermissions(request, requestorSignature, __current); + __ret.__write(__os); + } + catch(const ::Ehr::EhrException& __ex) + { + __os->write(__ex); + return ::Ice::DispatchUserException; + } + return ::Ice::DispatchOK; +} + +::Ice::DispatchStatus +Ehr::Provider::___removePermission(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) +{ + __checkMode(::Ice::Normal, __current.mode); + ::IceInternal::BasicStream* __is = __inS.is(); + __is->startReadEncaps(); + ::Ehr::RemovePermissionRequestPtr request; + ::Ehr::Signature requestorSignature; + __is->read(::Ehr::__patch__RemovePermissionRequestPtr, &request); + requestorSignature.__read(__is); + __is->readPendingObjects(); + __is->endReadEncaps(); + ::IceInternal::BasicStream* __os = __inS.os(); + try + { + removePermission(request, requestorSignature, __current); + } + catch(const ::Ehr::EhrException& __ex) + { + __os->write(__ex); + return ::Ice::DispatchUserException; + } + return ::Ice::DispatchOK; +} + +static ::std::string __Ehr__Provider_all[] = +{ + "consumePrescription", + "createPermission", + "createPrescription", + "findDocuments", + "ice_id", + "ice_ids", + "ice_isA", + "ice_ping", + "listDocuments", + "listPermissions", + "removePermission", + "setDefaultAccess" +}; + +::Ice::DispatchStatus +Ehr::Provider::__dispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) +{ + ::std::pair< ::std::string*, ::std::string*> r = ::std::equal_range(__Ehr__Provider_all, __Ehr__Provider_all + 12, current.operation); + if(r.first == r.second) + { + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); + } + + switch(r.first - __Ehr__Provider_all) + { + case 0: + { + return ___consumePrescription(in, current); + } + case 1: + { + return ___createPermission(in, current); + } + case 2: + { + return ___createPrescription(in, current); + } + case 3: + { + return ___findDocuments(in, current); + } + case 4: + { + return ___ice_id(in, current); + } + case 5: + { + return ___ice_ids(in, current); + } + case 6: + { + return ___ice_isA(in, current); + } + case 7: + { + return ___ice_ping(in, current); + } + case 8: + { + return ___listDocuments(in, current); + } + case 9: + { + return ___listPermissions(in, current); + } + case 10: + { + return ___removePermission(in, current); + } + case 11: + { + return ___setDefaultAccess(in, current); + } + } + + assert(false); + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); +} + +void +Ehr::Provider::__write(::IceInternal::BasicStream* __os) const +{ + __os->writeTypeId(ice_staticId()); + __os->startWriteSlice(); + __os->endWriteSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Object::__write(__os); +#else + ::Ice::Object::__write(__os); +#endif +} + +void +Ehr::Provider::__read(::IceInternal::BasicStream* __is, bool __rid) +{ + if(__rid) + { + ::std::string myId; + __is->readTypeId(myId); + } + __is->startReadSlice(); + __is->endReadSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Object::__read(__is, true); +#else + ::Ice::Object::__read(__is, true); +#endif +} + +void +Ehr::Provider::__write(const ::Ice::OutputStreamPtr& __outS) const +{ + __outS->writeTypeId(ice_staticId()); + __outS->startSlice(); + __outS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Object::__write(__outS); +#else + ::Ice::Object::__write(__outS); +#endif +} + +void +Ehr::Provider::__read(const ::Ice::InputStreamPtr& __inS, bool __rid) +{ + if(__rid) + { + __inS->readTypeId(); + } + __inS->startSlice(); + __inS->endSlice(); +#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + Object::__read(__inS, true); +#else + ::Ice::Object::__read(__inS, true); +#endif +} + +void +Ehr::__patch__ProviderPtr(void* __addr, ::Ice::ObjectPtr& v) +{ + ::Ehr::ProviderPtr* p = static_cast< ::Ehr::ProviderPtr*>(__addr); + assert(p); + *p = ::Ehr::ProviderPtr::dynamicCast(v); + if(v && !*p) + { + IceInternal::Ex::throwUOE(::Ehr::Provider::ice_staticId(), v->ice_id()); + } +} + +bool +Ehr::operator==(const ::Ehr::Provider& l, const ::Ehr::Provider& r) +{ + return static_cast(l) == static_cast(r); +} + +bool +Ehr::operator<(const ::Ehr::Provider& l, const ::Ehr::Provider& r) +{ + return static_cast(l) < static_cast(r); +} diff --git a/task1/ehr.h b/task1/ehr.h new file mode 100644 index 0000000..7473373 --- /dev/null +++ b/task1/ehr.h @@ -0,0 +1,4594 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +// Ice version 3.3.1 +// Generated from file `ehr.ice' + +#ifndef __ehr_h__ +#define __ehr_h__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef ICE_IGNORE_VERSION +# if ICE_INT_VERSION / 100 != 303 +# error Ice version mismatch! +# endif +# if ICE_INT_VERSION % 100 > 50 +# error Beta header file detected +# endif +# if ICE_INT_VERSION % 100 < 1 +# error Ice patch level mismatch! +# endif +#endif + +namespace IceProxy +{ + +namespace Ehr +{ + +class Document; + +class Prescription; + +class ConsumedPrescription; + +class Request; + +class ThirdPartyRequest; + +class CreatePrescriptionRequest; + +class ConsumePrescriptionRequest; + +class ListDocumentsRequest; + +class FindDocumentsRequest; + +class CreatePermissionRequest; + +class SetDefaultAccessRequest; + +class ListPermissionsRequest; + +class RemovePermissionRequest; + +class Provider; + +} + +} + +namespace Ehr +{ + +class Document; +bool operator==(const Document&, const Document&); +bool operator<(const Document&, const Document&); + +class Prescription; +bool operator==(const Prescription&, const Prescription&); +bool operator<(const Prescription&, const Prescription&); + +class ConsumedPrescription; +bool operator==(const ConsumedPrescription&, const ConsumedPrescription&); +bool operator<(const ConsumedPrescription&, const ConsumedPrescription&); + +class Request; +bool operator==(const Request&, const Request&); +bool operator<(const Request&, const Request&); + +class ThirdPartyRequest; +bool operator==(const ThirdPartyRequest&, const ThirdPartyRequest&); +bool operator<(const ThirdPartyRequest&, const ThirdPartyRequest&); + +class CreatePrescriptionRequest; +bool operator==(const CreatePrescriptionRequest&, const CreatePrescriptionRequest&); +bool operator<(const CreatePrescriptionRequest&, const CreatePrescriptionRequest&); + +class ConsumePrescriptionRequest; +bool operator==(const ConsumePrescriptionRequest&, const ConsumePrescriptionRequest&); +bool operator<(const ConsumePrescriptionRequest&, const ConsumePrescriptionRequest&); + +class ListDocumentsRequest; +bool operator==(const ListDocumentsRequest&, const ListDocumentsRequest&); +bool operator<(const ListDocumentsRequest&, const ListDocumentsRequest&); + +class FindDocumentsRequest; +bool operator==(const FindDocumentsRequest&, const FindDocumentsRequest&); +bool operator<(const FindDocumentsRequest&, const FindDocumentsRequest&); + +class CreatePermissionRequest; +bool operator==(const CreatePermissionRequest&, const CreatePermissionRequest&); +bool operator<(const CreatePermissionRequest&, const CreatePermissionRequest&); + +class SetDefaultAccessRequest; +bool operator==(const SetDefaultAccessRequest&, const SetDefaultAccessRequest&); +bool operator<(const SetDefaultAccessRequest&, const SetDefaultAccessRequest&); + +class ListPermissionsRequest; +bool operator==(const ListPermissionsRequest&, const ListPermissionsRequest&); +bool operator<(const ListPermissionsRequest&, const ListPermissionsRequest&); + +class RemovePermissionRequest; +bool operator==(const RemovePermissionRequest&, const RemovePermissionRequest&); +bool operator<(const RemovePermissionRequest&, const RemovePermissionRequest&); + +class Provider; +bool operator==(const Provider&, const Provider&); +bool operator<(const Provider&, const Provider&); + +} + +namespace IceInternal +{ + +::Ice::Object* upCast(::Ehr::Document*); +::IceProxy::Ice::Object* upCast(::IceProxy::Ehr::Document*); + +::Ice::Object* upCast(::Ehr::Prescription*); +::IceProxy::Ice::Object* upCast(::IceProxy::Ehr::Prescription*); + +::Ice::Object* upCast(::Ehr::ConsumedPrescription*); +::IceProxy::Ice::Object* upCast(::IceProxy::Ehr::ConsumedPrescription*); + +::Ice::Object* upCast(::Ehr::Request*); +::IceProxy::Ice::Object* upCast(::IceProxy::Ehr::Request*); + +::Ice::Object* upCast(::Ehr::ThirdPartyRequest*); +::IceProxy::Ice::Object* upCast(::IceProxy::Ehr::ThirdPartyRequest*); + +::Ice::Object* upCast(::Ehr::CreatePrescriptionRequest*); +::IceProxy::Ice::Object* upCast(::IceProxy::Ehr::CreatePrescriptionRequest*); + +::Ice::Object* upCast(::Ehr::ConsumePrescriptionRequest*); +::IceProxy::Ice::Object* upCast(::IceProxy::Ehr::ConsumePrescriptionRequest*); + +::Ice::Object* upCast(::Ehr::ListDocumentsRequest*); +::IceProxy::Ice::Object* upCast(::IceProxy::Ehr::ListDocumentsRequest*); + +::Ice::Object* upCast(::Ehr::FindDocumentsRequest*); +::IceProxy::Ice::Object* upCast(::IceProxy::Ehr::FindDocumentsRequest*); + +::Ice::Object* upCast(::Ehr::CreatePermissionRequest*); +::IceProxy::Ice::Object* upCast(::IceProxy::Ehr::CreatePermissionRequest*); + +::Ice::Object* upCast(::Ehr::SetDefaultAccessRequest*); +::IceProxy::Ice::Object* upCast(::IceProxy::Ehr::SetDefaultAccessRequest*); + +::Ice::Object* upCast(::Ehr::ListPermissionsRequest*); +::IceProxy::Ice::Object* upCast(::IceProxy::Ehr::ListPermissionsRequest*); + +::Ice::Object* upCast(::Ehr::RemovePermissionRequest*); +::IceProxy::Ice::Object* upCast(::IceProxy::Ehr::RemovePermissionRequest*); + +::Ice::Object* upCast(::Ehr::Provider*); +::IceProxy::Ice::Object* upCast(::IceProxy::Ehr::Provider*); + +} + +namespace Ehr +{ + +typedef ::IceInternal::Handle< ::Ehr::Document> DocumentPtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::Ehr::Document> DocumentPrx; + +void __read(::IceInternal::BasicStream*, DocumentPrx&); +void __patch__DocumentPtr(void*, ::Ice::ObjectPtr&); + +void ice_writeDocumentPrx(const ::Ice::OutputStreamPtr&, const DocumentPrx&); +void ice_readDocumentPrx(const ::Ice::InputStreamPtr&, DocumentPrx&); +void ice_writeDocument(const ::Ice::OutputStreamPtr&, const DocumentPtr&); +void ice_readDocument(const ::Ice::InputStreamPtr&, DocumentPtr&); + +typedef ::IceInternal::Handle< ::Ehr::Prescription> PrescriptionPtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::Ehr::Prescription> PrescriptionPrx; + +void __read(::IceInternal::BasicStream*, PrescriptionPrx&); +void __patch__PrescriptionPtr(void*, ::Ice::ObjectPtr&); + +void ice_writePrescriptionPrx(const ::Ice::OutputStreamPtr&, const PrescriptionPrx&); +void ice_readPrescriptionPrx(const ::Ice::InputStreamPtr&, PrescriptionPrx&); +void ice_writePrescription(const ::Ice::OutputStreamPtr&, const PrescriptionPtr&); +void ice_readPrescription(const ::Ice::InputStreamPtr&, PrescriptionPtr&); + +typedef ::IceInternal::Handle< ::Ehr::ConsumedPrescription> ConsumedPrescriptionPtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::Ehr::ConsumedPrescription> ConsumedPrescriptionPrx; + +void __read(::IceInternal::BasicStream*, ConsumedPrescriptionPrx&); +void __patch__ConsumedPrescriptionPtr(void*, ::Ice::ObjectPtr&); + +void ice_writeConsumedPrescriptionPrx(const ::Ice::OutputStreamPtr&, const ConsumedPrescriptionPrx&); +void ice_readConsumedPrescriptionPrx(const ::Ice::InputStreamPtr&, ConsumedPrescriptionPrx&); +void ice_writeConsumedPrescription(const ::Ice::OutputStreamPtr&, const ConsumedPrescriptionPtr&); +void ice_readConsumedPrescription(const ::Ice::InputStreamPtr&, ConsumedPrescriptionPtr&); + +typedef ::IceInternal::Handle< ::Ehr::Request> RequestPtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::Ehr::Request> RequestPrx; + +void __read(::IceInternal::BasicStream*, RequestPrx&); +void __patch__RequestPtr(void*, ::Ice::ObjectPtr&); + +void ice_writeRequestPrx(const ::Ice::OutputStreamPtr&, const RequestPrx&); +void ice_readRequestPrx(const ::Ice::InputStreamPtr&, RequestPrx&); +void ice_writeRequest(const ::Ice::OutputStreamPtr&, const RequestPtr&); +void ice_readRequest(const ::Ice::InputStreamPtr&, RequestPtr&); + +typedef ::IceInternal::Handle< ::Ehr::ThirdPartyRequest> ThirdPartyRequestPtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::Ehr::ThirdPartyRequest> ThirdPartyRequestPrx; + +void __read(::IceInternal::BasicStream*, ThirdPartyRequestPrx&); +void __patch__ThirdPartyRequestPtr(void*, ::Ice::ObjectPtr&); + +void ice_writeThirdPartyRequestPrx(const ::Ice::OutputStreamPtr&, const ThirdPartyRequestPrx&); +void ice_readThirdPartyRequestPrx(const ::Ice::InputStreamPtr&, ThirdPartyRequestPrx&); +void ice_writeThirdPartyRequest(const ::Ice::OutputStreamPtr&, const ThirdPartyRequestPtr&); +void ice_readThirdPartyRequest(const ::Ice::InputStreamPtr&, ThirdPartyRequestPtr&); + +typedef ::IceInternal::Handle< ::Ehr::CreatePrescriptionRequest> CreatePrescriptionRequestPtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::Ehr::CreatePrescriptionRequest> CreatePrescriptionRequestPrx; + +void __read(::IceInternal::BasicStream*, CreatePrescriptionRequestPrx&); +void __patch__CreatePrescriptionRequestPtr(void*, ::Ice::ObjectPtr&); + +void ice_writeCreatePrescriptionRequestPrx(const ::Ice::OutputStreamPtr&, const CreatePrescriptionRequestPrx&); +void ice_readCreatePrescriptionRequestPrx(const ::Ice::InputStreamPtr&, CreatePrescriptionRequestPrx&); +void ice_writeCreatePrescriptionRequest(const ::Ice::OutputStreamPtr&, const CreatePrescriptionRequestPtr&); +void ice_readCreatePrescriptionRequest(const ::Ice::InputStreamPtr&, CreatePrescriptionRequestPtr&); + +typedef ::IceInternal::Handle< ::Ehr::ConsumePrescriptionRequest> ConsumePrescriptionRequestPtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::Ehr::ConsumePrescriptionRequest> ConsumePrescriptionRequestPrx; + +void __read(::IceInternal::BasicStream*, ConsumePrescriptionRequestPrx&); +void __patch__ConsumePrescriptionRequestPtr(void*, ::Ice::ObjectPtr&); + +void ice_writeConsumePrescriptionRequestPrx(const ::Ice::OutputStreamPtr&, const ConsumePrescriptionRequestPrx&); +void ice_readConsumePrescriptionRequestPrx(const ::Ice::InputStreamPtr&, ConsumePrescriptionRequestPrx&); +void ice_writeConsumePrescriptionRequest(const ::Ice::OutputStreamPtr&, const ConsumePrescriptionRequestPtr&); +void ice_readConsumePrescriptionRequest(const ::Ice::InputStreamPtr&, ConsumePrescriptionRequestPtr&); + +typedef ::IceInternal::Handle< ::Ehr::ListDocumentsRequest> ListDocumentsRequestPtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::Ehr::ListDocumentsRequest> ListDocumentsRequestPrx; + +void __read(::IceInternal::BasicStream*, ListDocumentsRequestPrx&); +void __patch__ListDocumentsRequestPtr(void*, ::Ice::ObjectPtr&); + +void ice_writeListDocumentsRequestPrx(const ::Ice::OutputStreamPtr&, const ListDocumentsRequestPrx&); +void ice_readListDocumentsRequestPrx(const ::Ice::InputStreamPtr&, ListDocumentsRequestPrx&); +void ice_writeListDocumentsRequest(const ::Ice::OutputStreamPtr&, const ListDocumentsRequestPtr&); +void ice_readListDocumentsRequest(const ::Ice::InputStreamPtr&, ListDocumentsRequestPtr&); + +typedef ::IceInternal::Handle< ::Ehr::FindDocumentsRequest> FindDocumentsRequestPtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::Ehr::FindDocumentsRequest> FindDocumentsRequestPrx; + +void __read(::IceInternal::BasicStream*, FindDocumentsRequestPrx&); +void __patch__FindDocumentsRequestPtr(void*, ::Ice::ObjectPtr&); + +void ice_writeFindDocumentsRequestPrx(const ::Ice::OutputStreamPtr&, const FindDocumentsRequestPrx&); +void ice_readFindDocumentsRequestPrx(const ::Ice::InputStreamPtr&, FindDocumentsRequestPrx&); +void ice_writeFindDocumentsRequest(const ::Ice::OutputStreamPtr&, const FindDocumentsRequestPtr&); +void ice_readFindDocumentsRequest(const ::Ice::InputStreamPtr&, FindDocumentsRequestPtr&); + +typedef ::IceInternal::Handle< ::Ehr::CreatePermissionRequest> CreatePermissionRequestPtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::Ehr::CreatePermissionRequest> CreatePermissionRequestPrx; + +void __read(::IceInternal::BasicStream*, CreatePermissionRequestPrx&); +void __patch__CreatePermissionRequestPtr(void*, ::Ice::ObjectPtr&); + +void ice_writeCreatePermissionRequestPrx(const ::Ice::OutputStreamPtr&, const CreatePermissionRequestPrx&); +void ice_readCreatePermissionRequestPrx(const ::Ice::InputStreamPtr&, CreatePermissionRequestPrx&); +void ice_writeCreatePermissionRequest(const ::Ice::OutputStreamPtr&, const CreatePermissionRequestPtr&); +void ice_readCreatePermissionRequest(const ::Ice::InputStreamPtr&, CreatePermissionRequestPtr&); + +typedef ::IceInternal::Handle< ::Ehr::SetDefaultAccessRequest> SetDefaultAccessRequestPtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::Ehr::SetDefaultAccessRequest> SetDefaultAccessRequestPrx; + +void __read(::IceInternal::BasicStream*, SetDefaultAccessRequestPrx&); +void __patch__SetDefaultAccessRequestPtr(void*, ::Ice::ObjectPtr&); + +void ice_writeSetDefaultAccessRequestPrx(const ::Ice::OutputStreamPtr&, const SetDefaultAccessRequestPrx&); +void ice_readSetDefaultAccessRequestPrx(const ::Ice::InputStreamPtr&, SetDefaultAccessRequestPrx&); +void ice_writeSetDefaultAccessRequest(const ::Ice::OutputStreamPtr&, const SetDefaultAccessRequestPtr&); +void ice_readSetDefaultAccessRequest(const ::Ice::InputStreamPtr&, SetDefaultAccessRequestPtr&); + +typedef ::IceInternal::Handle< ::Ehr::ListPermissionsRequest> ListPermissionsRequestPtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::Ehr::ListPermissionsRequest> ListPermissionsRequestPrx; + +void __read(::IceInternal::BasicStream*, ListPermissionsRequestPrx&); +void __patch__ListPermissionsRequestPtr(void*, ::Ice::ObjectPtr&); + +void ice_writeListPermissionsRequestPrx(const ::Ice::OutputStreamPtr&, const ListPermissionsRequestPrx&); +void ice_readListPermissionsRequestPrx(const ::Ice::InputStreamPtr&, ListPermissionsRequestPrx&); +void ice_writeListPermissionsRequest(const ::Ice::OutputStreamPtr&, const ListPermissionsRequestPtr&); +void ice_readListPermissionsRequest(const ::Ice::InputStreamPtr&, ListPermissionsRequestPtr&); + +typedef ::IceInternal::Handle< ::Ehr::RemovePermissionRequest> RemovePermissionRequestPtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::Ehr::RemovePermissionRequest> RemovePermissionRequestPrx; + +void __read(::IceInternal::BasicStream*, RemovePermissionRequestPrx&); +void __patch__RemovePermissionRequestPtr(void*, ::Ice::ObjectPtr&); + +void ice_writeRemovePermissionRequestPrx(const ::Ice::OutputStreamPtr&, const RemovePermissionRequestPrx&); +void ice_readRemovePermissionRequestPrx(const ::Ice::InputStreamPtr&, RemovePermissionRequestPrx&); +void ice_writeRemovePermissionRequest(const ::Ice::OutputStreamPtr&, const RemovePermissionRequestPtr&); +void ice_readRemovePermissionRequest(const ::Ice::InputStreamPtr&, RemovePermissionRequestPtr&); + +typedef ::IceInternal::Handle< ::Ehr::Provider> ProviderPtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::Ehr::Provider> ProviderPrx; + +void __read(::IceInternal::BasicStream*, ProviderPrx&); +void __patch__ProviderPtr(void*, ::Ice::ObjectPtr&); + +void ice_writeProviderPrx(const ::Ice::OutputStreamPtr&, const ProviderPrx&); +void ice_readProviderPrx(const ::Ice::InputStreamPtr&, ProviderPrx&); +void ice_writeProvider(const ::Ice::OutputStreamPtr&, const ProviderPtr&); +void ice_readProvider(const ::Ice::InputStreamPtr&, ProviderPtr&); + +} + +namespace Ehr +{ + +typedef ::std::vector< ::Ice::Byte> ByteSeq; + +class EhrException : public ::Ice::UserException +{ +public: + + EhrException() {} + explicit EhrException(const ::std::string&); + virtual ~EhrException() throw(); + + virtual ::std::string ice_name() const; + virtual ::Ice::Exception* ice_clone() const; + virtual void ice_throw() const; + + static const ::IceInternal::UserExceptionFactoryPtr& ice_factory(); + + ::std::string what; + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); +}; + +static EhrException __EhrException_init; + +class InvalidRequestException : public ::Ehr::EhrException +{ +public: + + InvalidRequestException() {} + explicit InvalidRequestException(const ::std::string&); + virtual ~InvalidRequestException() throw(); + + virtual ::std::string ice_name() const; + virtual ::Ice::Exception* ice_clone() const; + virtual void ice_throw() const; + + static const ::IceInternal::UserExceptionFactoryPtr& ice_factory(); + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); +}; + +class InvalidAccountException : public ::Ehr::InvalidRequestException +{ +public: + + InvalidAccountException() {} + explicit InvalidAccountException(const ::std::string&); + virtual ~InvalidAccountException() throw(); + + virtual ::std::string ice_name() const; + virtual ::Ice::Exception* ice_clone() const; + virtual void ice_throw() const; + + static const ::IceInternal::UserExceptionFactoryPtr& ice_factory(); + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); +}; + +class SignatureException : public ::Ehr::EhrException +{ +public: + + SignatureException() {} + explicit SignatureException(const ::std::string&); + virtual ~SignatureException() throw(); + + virtual ::std::string ice_name() const; + virtual ::Ice::Exception* ice_clone() const; + virtual void ice_throw() const; + + static const ::IceInternal::UserExceptionFactoryPtr& ice_factory(); + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); +}; + +class PermissionDeniedException : public ::Ehr::EhrException +{ +public: + + PermissionDeniedException() {} + explicit PermissionDeniedException(const ::std::string&); + virtual ~PermissionDeniedException() throw(); + + virtual ::std::string ice_name() const; + virtual ::Ice::Exception* ice_clone() const; + virtual void ice_throw() const; + + static const ::IceInternal::UserExceptionFactoryPtr& ice_factory(); + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); +}; + +struct AccountIdentifier +{ + ::std::string user; + ::std::string provider; + + bool operator==(const AccountIdentifier&) const; + bool operator<(const AccountIdentifier&) const; + bool operator!=(const AccountIdentifier& __rhs) const + { + return !operator==(__rhs); + } + bool operator<=(const AccountIdentifier& __rhs) const + { + return operator<(__rhs) || operator==(__rhs); + } + bool operator>(const AccountIdentifier& __rhs) const + { + return !operator<(__rhs) && !operator==(__rhs); + } + bool operator>=(const AccountIdentifier& __rhs) const + { + return !operator<(__rhs); + } + + void __write(::IceInternal::BasicStream*) const; + void __read(::IceInternal::BasicStream*); + + void ice_write(const ::Ice::OutputStreamPtr&) const; + void ice_read(const ::Ice::InputStreamPtr&); +}; + +void ice_writeAccountIdentifier(const ::Ice::OutputStreamPtr&, const AccountIdentifier&); +void ice_readAccountIdentifier(const ::Ice::InputStreamPtr&, AccountIdentifier&); + +enum DocumentType +{ + DOCANY, + DOCPRESCRIPTION, + DOCCONSUMEDPRESCRIPTION +}; + +void __write(::IceInternal::BasicStream*, DocumentType); +void __read(::IceInternal::BasicStream*, DocumentType&); + +void ice_writeDocumentType(const ::Ice::OutputStreamPtr&, DocumentType); +void ice_readDocumentType(const ::Ice::InputStreamPtr&, DocumentType&); + +struct Signature +{ + ::Ehr::ByteSeq data; + + bool operator==(const Signature&) const; + bool operator<(const Signature&) const; + bool operator!=(const Signature& __rhs) const + { + return !operator==(__rhs); + } + bool operator<=(const Signature& __rhs) const + { + return operator<(__rhs) || operator==(__rhs); + } + bool operator>(const Signature& __rhs) const + { + return !operator<(__rhs) && !operator==(__rhs); + } + bool operator>=(const Signature& __rhs) const + { + return !operator<(__rhs); + } + + void __write(::IceInternal::BasicStream*) const; + void __read(::IceInternal::BasicStream*); + + void ice_write(const ::Ice::OutputStreamPtr&) const; + void ice_read(const ::Ice::InputStreamPtr&); +}; + +void ice_writeSignature(const ::Ice::OutputStreamPtr&, const Signature&); +void ice_readSignature(const ::Ice::InputStreamPtr&, Signature&); + +struct Timestamp +{ + ::Ice::Long msecs; + + bool operator==(const Timestamp&) const; + bool operator<(const Timestamp&) const; + bool operator!=(const Timestamp& __rhs) const + { + return !operator==(__rhs); + } + bool operator<=(const Timestamp& __rhs) const + { + return operator<(__rhs) || operator==(__rhs); + } + bool operator>(const Timestamp& __rhs) const + { + return !operator<(__rhs) && !operator==(__rhs); + } + bool operator>=(const Timestamp& __rhs) const + { + return !operator<(__rhs); + } + + void __write(::IceInternal::BasicStream*) const; + void __read(::IceInternal::BasicStream*); + + void ice_write(const ::Ice::OutputStreamPtr&) const; + void ice_read(const ::Ice::InputStreamPtr&); +}; + +void ice_writeTimestamp(const ::Ice::OutputStreamPtr&, const Timestamp&); +void ice_readTimestamp(const ::Ice::InputStreamPtr&, Timestamp&); + +struct Date +{ + ::Ice::Byte day; + ::Ice::Byte month; + ::Ice::Short year; + + bool operator==(const Date&) const; + bool operator<(const Date&) const; + bool operator!=(const Date& __rhs) const + { + return !operator==(__rhs); + } + bool operator<=(const Date& __rhs) const + { + return operator<(__rhs) || operator==(__rhs); + } + bool operator>(const Date& __rhs) const + { + return !operator<(__rhs) && !operator==(__rhs); + } + bool operator>=(const Date& __rhs) const + { + return !operator<(__rhs); + } + + void __write(::IceInternal::BasicStream*) const; + void __read(::IceInternal::BasicStream*); + + void ice_write(const ::Ice::OutputStreamPtr&) const; + void ice_read(const ::Ice::InputStreamPtr&); +}; + +void ice_writeDate(const ::Ice::OutputStreamPtr&, const Date&); +void ice_readDate(const ::Ice::InputStreamPtr&, Date&); + +enum AccessType +{ + ALLOW, + DENY +}; + +void __write(::IceInternal::BasicStream*, AccessType); +void __read(::IceInternal::BasicStream*, AccessType&); + +void ice_writeAccessType(const ::Ice::OutputStreamPtr&, AccessType); +void ice_readAccessType(const ::Ice::InputStreamPtr&, AccessType&); + +struct EncryptedDocument +{ + ::Ehr::ByteSeq encryptedKey; + ::Ehr::ByteSeq initialVector; + ::Ehr::ByteSeq encryptedData; + + bool operator==(const EncryptedDocument&) const; + bool operator<(const EncryptedDocument&) const; + bool operator!=(const EncryptedDocument& __rhs) const + { + return !operator==(__rhs); + } + bool operator<=(const EncryptedDocument& __rhs) const + { + return operator<(__rhs) || operator==(__rhs); + } + bool operator>(const EncryptedDocument& __rhs) const + { + return !operator<(__rhs) && !operator==(__rhs); + } + bool operator>=(const EncryptedDocument& __rhs) const + { + return !operator<(__rhs); + } + + void __write(::IceInternal::BasicStream*) const; + void __read(::IceInternal::BasicStream*); + + void ice_write(const ::Ice::OutputStreamPtr&) const; + void ice_read(const ::Ice::InputStreamPtr&); +}; + +void ice_writeEncryptedDocument(const ::Ice::OutputStreamPtr&, const EncryptedDocument&); +void ice_readEncryptedDocument(const ::Ice::InputStreamPtr&, EncryptedDocument&); + +struct DocumentListItem +{ + ::Ice::Long id; + ::Ehr::Timestamp created; + ::Ehr::EncryptedDocument document; + + bool operator==(const DocumentListItem&) const; + bool operator<(const DocumentListItem&) const; + bool operator!=(const DocumentListItem& __rhs) const + { + return !operator==(__rhs); + } + bool operator<=(const DocumentListItem& __rhs) const + { + return operator<(__rhs) || operator==(__rhs); + } + bool operator>(const DocumentListItem& __rhs) const + { + return !operator<(__rhs) && !operator==(__rhs); + } + bool operator>=(const DocumentListItem& __rhs) const + { + return !operator<(__rhs); + } + + void __write(::IceInternal::BasicStream*) const; + void __read(::IceInternal::BasicStream*); + + void ice_write(const ::Ice::OutputStreamPtr&) const; + void ice_read(const ::Ice::InputStreamPtr&); +}; + +void ice_writeDocumentListItem(const ::Ice::OutputStreamPtr&, const DocumentListItem&); +void ice_readDocumentListItem(const ::Ice::InputStreamPtr&, DocumentListItem&); + +typedef ::std::vector< ::Ehr::DocumentListItem> DocumentList; +void __writeDocumentList(::IceInternal::BasicStream*, const ::Ehr::DocumentListItem*, const ::Ehr::DocumentListItem*); +void __readDocumentList(::IceInternal::BasicStream*, DocumentList&); +void ice_writeDocumentList(const ::Ice::OutputStreamPtr&, const DocumentList&); +void ice_readDocumentList(const ::Ice::InputStreamPtr&, DocumentList&); + +struct AccessControlListItem +{ + ::Ice::Long id; + ::Ehr::AccountIdentifier account; + ::Ehr::AccessType access; + + bool operator==(const AccessControlListItem&) const; + bool operator<(const AccessControlListItem&) const; + bool operator!=(const AccessControlListItem& __rhs) const + { + return !operator==(__rhs); + } + bool operator<=(const AccessControlListItem& __rhs) const + { + return operator<(__rhs) || operator==(__rhs); + } + bool operator>(const AccessControlListItem& __rhs) const + { + return !operator<(__rhs) && !operator==(__rhs); + } + bool operator>=(const AccessControlListItem& __rhs) const + { + return !operator<(__rhs); + } + + void __write(::IceInternal::BasicStream*) const; + void __read(::IceInternal::BasicStream*); + + void ice_write(const ::Ice::OutputStreamPtr&) const; + void ice_read(const ::Ice::InputStreamPtr&); +}; + +void ice_writeAccessControlListItem(const ::Ice::OutputStreamPtr&, const AccessControlListItem&); +void ice_readAccessControlListItem(const ::Ice::InputStreamPtr&, AccessControlListItem&); + +typedef ::std::vector< ::Ehr::AccessControlListItem> AccessControlList; +void __writeAccessControlList(::IceInternal::BasicStream*, const ::Ehr::AccessControlListItem*, const ::Ehr::AccessControlListItem*); +void __readAccessControlList(::IceInternal::BasicStream*, AccessControlList&); +void ice_writeAccessControlList(const ::Ice::OutputStreamPtr&, const AccessControlList&); +void ice_readAccessControlList(const ::Ice::InputStreamPtr&, AccessControlList&); + +struct Permissions +{ + ::Ehr::AccessType defaultAccess; + ::Ehr::AccessControlList acl; + + bool operator==(const Permissions&) const; + bool operator<(const Permissions&) const; + bool operator!=(const Permissions& __rhs) const + { + return !operator==(__rhs); + } + bool operator<=(const Permissions& __rhs) const + { + return operator<(__rhs) || operator==(__rhs); + } + bool operator>(const Permissions& __rhs) const + { + return !operator<(__rhs) && !operator==(__rhs); + } + bool operator>=(const Permissions& __rhs) const + { + return !operator<(__rhs); + } + + void __write(::IceInternal::BasicStream*) const; + void __read(::IceInternal::BasicStream*); + + void ice_write(const ::Ice::OutputStreamPtr&) const; + void ice_read(const ::Ice::InputStreamPtr&); +}; + +void ice_writePermissions(const ::Ice::OutputStreamPtr&, const Permissions&); +void ice_readPermissions(const ::Ice::InputStreamPtr&, Permissions&); + +} + +namespace IceProxy +{ + +namespace Ehr +{ + +class Document : virtual public ::IceProxy::Ice::Object +{ +public: + + ::IceInternal::ProxyHandle ice_context(const ::Ice::Context& __context) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_context(__context).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_context(__context).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_adapterId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_adapterId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_adapterId(__id).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpoints(__endpoints).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locatorCacheTimeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locatorCacheTimeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionCached(bool __cached) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionCached(__cached).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionCached(__cached).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpointSelection(::Ice::EndpointSelectionType __est) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpointSelection(__est).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpointSelection(__est).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_secure(bool __secure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_secure(__secure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_secure(__secure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_preferSecure(bool __preferSecure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_preferSecure(__preferSecure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_router(const ::Ice::RouterPrx& __router) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_router(__router).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_router(__router).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locator(const ::Ice::LocatorPrx& __locator) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locator(__locator).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locator(__locator).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_collocationOptimized(bool __co) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_collocationOptimized(__co).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_twoway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_twoway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_twoway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_oneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_oneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_oneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchOneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchOneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchOneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_datagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_datagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_datagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchDatagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchDatagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchDatagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_compress(bool __compress) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_compress(__compress).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_compress(__compress).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_timeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_timeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_timeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionId(__id).get()); + #endif + } + + static const ::std::string& ice_staticId(); + +private: + + virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM(); + virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD(); + virtual ::IceProxy::Ice::Object* __newInstance() const; +}; + +class Prescription : virtual public ::IceProxy::Ehr::Document +{ +public: + + ::IceInternal::ProxyHandle ice_context(const ::Ice::Context& __context) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_context(__context).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_context(__context).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_adapterId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_adapterId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_adapterId(__id).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpoints(__endpoints).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locatorCacheTimeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locatorCacheTimeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionCached(bool __cached) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionCached(__cached).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionCached(__cached).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpointSelection(::Ice::EndpointSelectionType __est) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpointSelection(__est).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpointSelection(__est).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_secure(bool __secure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_secure(__secure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_secure(__secure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_preferSecure(bool __preferSecure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_preferSecure(__preferSecure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_router(const ::Ice::RouterPrx& __router) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_router(__router).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_router(__router).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locator(const ::Ice::LocatorPrx& __locator) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locator(__locator).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locator(__locator).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_collocationOptimized(bool __co) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_collocationOptimized(__co).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_twoway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_twoway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_twoway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_oneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_oneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_oneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchOneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchOneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchOneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_datagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_datagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_datagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchDatagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchDatagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchDatagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_compress(bool __compress) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_compress(__compress).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_compress(__compress).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_timeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_timeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_timeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionId(__id).get()); + #endif + } + + static const ::std::string& ice_staticId(); + +private: + + virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM(); + virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD(); + virtual ::IceProxy::Ice::Object* __newInstance() const; +}; + +class ConsumedPrescription : virtual public ::IceProxy::Ehr::Prescription +{ +public: + + ::IceInternal::ProxyHandle ice_context(const ::Ice::Context& __context) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_context(__context).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_context(__context).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_adapterId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_adapterId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_adapterId(__id).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpoints(__endpoints).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locatorCacheTimeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locatorCacheTimeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionCached(bool __cached) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionCached(__cached).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionCached(__cached).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpointSelection(::Ice::EndpointSelectionType __est) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpointSelection(__est).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpointSelection(__est).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_secure(bool __secure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_secure(__secure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_secure(__secure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_preferSecure(bool __preferSecure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_preferSecure(__preferSecure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_router(const ::Ice::RouterPrx& __router) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_router(__router).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_router(__router).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locator(const ::Ice::LocatorPrx& __locator) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locator(__locator).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locator(__locator).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_collocationOptimized(bool __co) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_collocationOptimized(__co).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_twoway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_twoway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_twoway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_oneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_oneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_oneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchOneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchOneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchOneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_datagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_datagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_datagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchDatagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchDatagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchDatagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_compress(bool __compress) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_compress(__compress).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_compress(__compress).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_timeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_timeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_timeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionId(__id).get()); + #endif + } + + static const ::std::string& ice_staticId(); + +private: + + virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM(); + virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD(); + virtual ::IceProxy::Ice::Object* __newInstance() const; +}; + +class Request : virtual public ::IceProxy::Ice::Object +{ +public: + + ::IceInternal::ProxyHandle ice_context(const ::Ice::Context& __context) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_context(__context).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_context(__context).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_adapterId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_adapterId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_adapterId(__id).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpoints(__endpoints).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locatorCacheTimeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locatorCacheTimeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionCached(bool __cached) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionCached(__cached).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionCached(__cached).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpointSelection(::Ice::EndpointSelectionType __est) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpointSelection(__est).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpointSelection(__est).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_secure(bool __secure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_secure(__secure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_secure(__secure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_preferSecure(bool __preferSecure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_preferSecure(__preferSecure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_router(const ::Ice::RouterPrx& __router) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_router(__router).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_router(__router).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locator(const ::Ice::LocatorPrx& __locator) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locator(__locator).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locator(__locator).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_collocationOptimized(bool __co) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_collocationOptimized(__co).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_twoway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_twoway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_twoway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_oneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_oneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_oneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchOneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchOneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchOneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_datagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_datagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_datagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchDatagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchDatagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchDatagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_compress(bool __compress) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_compress(__compress).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_compress(__compress).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_timeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_timeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_timeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionId(__id).get()); + #endif + } + + static const ::std::string& ice_staticId(); + +private: + + virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM(); + virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD(); + virtual ::IceProxy::Ice::Object* __newInstance() const; +}; + +class ThirdPartyRequest : virtual public ::IceProxy::Ehr::Request +{ +public: + + ::IceInternal::ProxyHandle ice_context(const ::Ice::Context& __context) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_context(__context).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_context(__context).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_adapterId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_adapterId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_adapterId(__id).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpoints(__endpoints).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locatorCacheTimeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locatorCacheTimeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionCached(bool __cached) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionCached(__cached).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionCached(__cached).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpointSelection(::Ice::EndpointSelectionType __est) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpointSelection(__est).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpointSelection(__est).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_secure(bool __secure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_secure(__secure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_secure(__secure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_preferSecure(bool __preferSecure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_preferSecure(__preferSecure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_router(const ::Ice::RouterPrx& __router) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_router(__router).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_router(__router).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locator(const ::Ice::LocatorPrx& __locator) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locator(__locator).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locator(__locator).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_collocationOptimized(bool __co) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_collocationOptimized(__co).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_twoway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_twoway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_twoway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_oneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_oneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_oneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchOneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchOneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchOneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_datagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_datagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_datagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchDatagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchDatagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchDatagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_compress(bool __compress) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_compress(__compress).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_compress(__compress).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_timeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_timeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_timeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionId(__id).get()); + #endif + } + + static const ::std::string& ice_staticId(); + +private: + + virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM(); + virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD(); + virtual ::IceProxy::Ice::Object* __newInstance() const; +}; + +class CreatePrescriptionRequest : virtual public ::IceProxy::Ehr::ThirdPartyRequest +{ +public: + + ::IceInternal::ProxyHandle ice_context(const ::Ice::Context& __context) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_context(__context).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_context(__context).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_adapterId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_adapterId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_adapterId(__id).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpoints(__endpoints).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locatorCacheTimeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locatorCacheTimeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionCached(bool __cached) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionCached(__cached).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionCached(__cached).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpointSelection(::Ice::EndpointSelectionType __est) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpointSelection(__est).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpointSelection(__est).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_secure(bool __secure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_secure(__secure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_secure(__secure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_preferSecure(bool __preferSecure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_preferSecure(__preferSecure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_router(const ::Ice::RouterPrx& __router) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_router(__router).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_router(__router).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locator(const ::Ice::LocatorPrx& __locator) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locator(__locator).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locator(__locator).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_collocationOptimized(bool __co) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_collocationOptimized(__co).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_twoway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_twoway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_twoway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_oneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_oneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_oneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchOneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchOneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchOneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_datagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_datagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_datagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchDatagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchDatagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchDatagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_compress(bool __compress) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_compress(__compress).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_compress(__compress).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_timeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_timeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_timeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionId(__id).get()); + #endif + } + + static const ::std::string& ice_staticId(); + +private: + + virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM(); + virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD(); + virtual ::IceProxy::Ice::Object* __newInstance() const; +}; + +class ConsumePrescriptionRequest : virtual public ::IceProxy::Ehr::ThirdPartyRequest +{ +public: + + ::IceInternal::ProxyHandle ice_context(const ::Ice::Context& __context) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_context(__context).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_context(__context).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_adapterId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_adapterId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_adapterId(__id).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpoints(__endpoints).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locatorCacheTimeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locatorCacheTimeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionCached(bool __cached) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionCached(__cached).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionCached(__cached).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpointSelection(::Ice::EndpointSelectionType __est) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpointSelection(__est).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpointSelection(__est).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_secure(bool __secure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_secure(__secure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_secure(__secure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_preferSecure(bool __preferSecure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_preferSecure(__preferSecure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_router(const ::Ice::RouterPrx& __router) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_router(__router).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_router(__router).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locator(const ::Ice::LocatorPrx& __locator) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locator(__locator).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locator(__locator).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_collocationOptimized(bool __co) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_collocationOptimized(__co).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_twoway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_twoway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_twoway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_oneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_oneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_oneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchOneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchOneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchOneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_datagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_datagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_datagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchDatagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchDatagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchDatagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_compress(bool __compress) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_compress(__compress).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_compress(__compress).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_timeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_timeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_timeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionId(__id).get()); + #endif + } + + static const ::std::string& ice_staticId(); + +private: + + virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM(); + virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD(); + virtual ::IceProxy::Ice::Object* __newInstance() const; +}; + +class ListDocumentsRequest : virtual public ::IceProxy::Ehr::ThirdPartyRequest +{ +public: + + ::IceInternal::ProxyHandle ice_context(const ::Ice::Context& __context) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_context(__context).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_context(__context).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_adapterId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_adapterId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_adapterId(__id).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpoints(__endpoints).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locatorCacheTimeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locatorCacheTimeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionCached(bool __cached) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionCached(__cached).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionCached(__cached).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpointSelection(::Ice::EndpointSelectionType __est) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpointSelection(__est).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpointSelection(__est).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_secure(bool __secure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_secure(__secure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_secure(__secure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_preferSecure(bool __preferSecure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_preferSecure(__preferSecure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_router(const ::Ice::RouterPrx& __router) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_router(__router).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_router(__router).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locator(const ::Ice::LocatorPrx& __locator) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locator(__locator).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locator(__locator).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_collocationOptimized(bool __co) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_collocationOptimized(__co).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_twoway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_twoway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_twoway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_oneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_oneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_oneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchOneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchOneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchOneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_datagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_datagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_datagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchDatagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchDatagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchDatagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_compress(bool __compress) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_compress(__compress).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_compress(__compress).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_timeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_timeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_timeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionId(__id).get()); + #endif + } + + static const ::std::string& ice_staticId(); + +private: + + virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM(); + virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD(); + virtual ::IceProxy::Ice::Object* __newInstance() const; +}; + +class FindDocumentsRequest : virtual public ::IceProxy::Ehr::ThirdPartyRequest +{ +public: + + ::IceInternal::ProxyHandle ice_context(const ::Ice::Context& __context) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_context(__context).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_context(__context).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_adapterId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_adapterId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_adapterId(__id).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpoints(__endpoints).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locatorCacheTimeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locatorCacheTimeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionCached(bool __cached) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionCached(__cached).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionCached(__cached).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpointSelection(::Ice::EndpointSelectionType __est) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpointSelection(__est).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpointSelection(__est).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_secure(bool __secure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_secure(__secure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_secure(__secure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_preferSecure(bool __preferSecure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_preferSecure(__preferSecure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_router(const ::Ice::RouterPrx& __router) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_router(__router).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_router(__router).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locator(const ::Ice::LocatorPrx& __locator) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locator(__locator).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locator(__locator).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_collocationOptimized(bool __co) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_collocationOptimized(__co).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_twoway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_twoway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_twoway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_oneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_oneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_oneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchOneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchOneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchOneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_datagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_datagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_datagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchDatagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchDatagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchDatagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_compress(bool __compress) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_compress(__compress).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_compress(__compress).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_timeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_timeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_timeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionId(__id).get()); + #endif + } + + static const ::std::string& ice_staticId(); + +private: + + virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM(); + virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD(); + virtual ::IceProxy::Ice::Object* __newInstance() const; +}; + +class CreatePermissionRequest : virtual public ::IceProxy::Ehr::Request +{ +public: + + ::IceInternal::ProxyHandle ice_context(const ::Ice::Context& __context) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_context(__context).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_context(__context).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_adapterId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_adapterId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_adapterId(__id).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpoints(__endpoints).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locatorCacheTimeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locatorCacheTimeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionCached(bool __cached) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionCached(__cached).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionCached(__cached).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpointSelection(::Ice::EndpointSelectionType __est) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpointSelection(__est).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpointSelection(__est).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_secure(bool __secure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_secure(__secure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_secure(__secure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_preferSecure(bool __preferSecure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_preferSecure(__preferSecure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_router(const ::Ice::RouterPrx& __router) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_router(__router).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_router(__router).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locator(const ::Ice::LocatorPrx& __locator) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locator(__locator).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locator(__locator).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_collocationOptimized(bool __co) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_collocationOptimized(__co).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_twoway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_twoway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_twoway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_oneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_oneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_oneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchOneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchOneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchOneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_datagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_datagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_datagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchDatagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchDatagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchDatagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_compress(bool __compress) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_compress(__compress).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_compress(__compress).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_timeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_timeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_timeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionId(__id).get()); + #endif + } + + static const ::std::string& ice_staticId(); + +private: + + virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM(); + virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD(); + virtual ::IceProxy::Ice::Object* __newInstance() const; +}; + +class SetDefaultAccessRequest : virtual public ::IceProxy::Ehr::Request +{ +public: + + ::IceInternal::ProxyHandle ice_context(const ::Ice::Context& __context) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_context(__context).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_context(__context).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_adapterId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_adapterId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_adapterId(__id).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpoints(__endpoints).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locatorCacheTimeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locatorCacheTimeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionCached(bool __cached) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionCached(__cached).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionCached(__cached).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpointSelection(::Ice::EndpointSelectionType __est) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpointSelection(__est).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpointSelection(__est).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_secure(bool __secure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_secure(__secure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_secure(__secure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_preferSecure(bool __preferSecure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_preferSecure(__preferSecure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_router(const ::Ice::RouterPrx& __router) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_router(__router).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_router(__router).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locator(const ::Ice::LocatorPrx& __locator) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locator(__locator).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locator(__locator).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_collocationOptimized(bool __co) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_collocationOptimized(__co).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_twoway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_twoway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_twoway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_oneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_oneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_oneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchOneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchOneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchOneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_datagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_datagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_datagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchDatagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchDatagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchDatagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_compress(bool __compress) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_compress(__compress).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_compress(__compress).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_timeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_timeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_timeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionId(__id).get()); + #endif + } + + static const ::std::string& ice_staticId(); + +private: + + virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM(); + virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD(); + virtual ::IceProxy::Ice::Object* __newInstance() const; +}; + +class ListPermissionsRequest : virtual public ::IceProxy::Ehr::Request +{ +public: + + ::IceInternal::ProxyHandle ice_context(const ::Ice::Context& __context) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_context(__context).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_context(__context).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_adapterId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_adapterId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_adapterId(__id).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpoints(__endpoints).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locatorCacheTimeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locatorCacheTimeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionCached(bool __cached) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionCached(__cached).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionCached(__cached).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpointSelection(::Ice::EndpointSelectionType __est) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpointSelection(__est).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpointSelection(__est).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_secure(bool __secure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_secure(__secure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_secure(__secure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_preferSecure(bool __preferSecure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_preferSecure(__preferSecure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_router(const ::Ice::RouterPrx& __router) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_router(__router).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_router(__router).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locator(const ::Ice::LocatorPrx& __locator) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locator(__locator).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locator(__locator).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_collocationOptimized(bool __co) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_collocationOptimized(__co).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_twoway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_twoway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_twoway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_oneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_oneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_oneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchOneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchOneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchOneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_datagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_datagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_datagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchDatagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchDatagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchDatagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_compress(bool __compress) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_compress(__compress).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_compress(__compress).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_timeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_timeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_timeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionId(__id).get()); + #endif + } + + static const ::std::string& ice_staticId(); + +private: + + virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM(); + virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD(); + virtual ::IceProxy::Ice::Object* __newInstance() const; +}; + +class RemovePermissionRequest : virtual public ::IceProxy::Ehr::Request +{ +public: + + ::IceInternal::ProxyHandle ice_context(const ::Ice::Context& __context) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_context(__context).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_context(__context).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_adapterId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_adapterId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_adapterId(__id).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpoints(__endpoints).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locatorCacheTimeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locatorCacheTimeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionCached(bool __cached) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionCached(__cached).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionCached(__cached).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpointSelection(::Ice::EndpointSelectionType __est) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpointSelection(__est).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpointSelection(__est).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_secure(bool __secure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_secure(__secure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_secure(__secure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_preferSecure(bool __preferSecure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_preferSecure(__preferSecure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_router(const ::Ice::RouterPrx& __router) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_router(__router).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_router(__router).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locator(const ::Ice::LocatorPrx& __locator) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locator(__locator).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locator(__locator).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_collocationOptimized(bool __co) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_collocationOptimized(__co).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_twoway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_twoway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_twoway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_oneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_oneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_oneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchOneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchOneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchOneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_datagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_datagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_datagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchDatagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchDatagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchDatagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_compress(bool __compress) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_compress(__compress).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_compress(__compress).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_timeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_timeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_timeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionId(__id).get()); + #endif + } + + static const ::std::string& ice_staticId(); + +private: + + virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM(); + virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD(); + virtual ::IceProxy::Ice::Object* __newInstance() const; +}; + +class Provider : virtual public ::IceProxy::Ice::Object +{ +public: + + void createPrescription(const ::Ehr::CreatePrescriptionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature) + { + createPrescription(request, requestorSignature, ownerSignature, 0); + } + void createPrescription(const ::Ehr::CreatePrescriptionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Context& __ctx) + { + createPrescription(request, requestorSignature, ownerSignature, &__ctx); + } + +private: + + void createPrescription(const ::Ehr::CreatePrescriptionRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Context*); + +public: + + void consumePrescription(const ::Ehr::ConsumePrescriptionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature) + { + consumePrescription(request, requestorSignature, ownerSignature, 0); + } + void consumePrescription(const ::Ehr::ConsumePrescriptionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Context& __ctx) + { + consumePrescription(request, requestorSignature, ownerSignature, &__ctx); + } + +private: + + void consumePrescription(const ::Ehr::ConsumePrescriptionRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Context*); + +public: + + ::Ehr::DocumentList listDocuments(const ::Ehr::ListDocumentsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature) + { + return listDocuments(request, requestorSignature, ownerSignature, 0); + } + ::Ehr::DocumentList listDocuments(const ::Ehr::ListDocumentsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Context& __ctx) + { + return listDocuments(request, requestorSignature, ownerSignature, &__ctx); + } + +private: + + ::Ehr::DocumentList listDocuments(const ::Ehr::ListDocumentsRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Context*); + +public: + + ::Ehr::DocumentList findDocuments(const ::Ehr::FindDocumentsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature) + { + return findDocuments(request, requestorSignature, ownerSignature, 0); + } + ::Ehr::DocumentList findDocuments(const ::Ehr::FindDocumentsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ehr::Signature& ownerSignature, const ::Ice::Context& __ctx) + { + return findDocuments(request, requestorSignature, ownerSignature, &__ctx); + } + +private: + + ::Ehr::DocumentList findDocuments(const ::Ehr::FindDocumentsRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Context*); + +public: + + void setDefaultAccess(const ::Ehr::SetDefaultAccessRequestPtr& request, const ::Ehr::Signature& requestorSignature) + { + setDefaultAccess(request, requestorSignature, 0); + } + void setDefaultAccess(const ::Ehr::SetDefaultAccessRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Context& __ctx) + { + setDefaultAccess(request, requestorSignature, &__ctx); + } + +private: + + void setDefaultAccess(const ::Ehr::SetDefaultAccessRequestPtr&, const ::Ehr::Signature&, const ::Ice::Context*); + +public: + + void createPermission(const ::Ehr::CreatePermissionRequestPtr& request, const ::Ehr::Signature& requestorSignature) + { + createPermission(request, requestorSignature, 0); + } + void createPermission(const ::Ehr::CreatePermissionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Context& __ctx) + { + createPermission(request, requestorSignature, &__ctx); + } + +private: + + void createPermission(const ::Ehr::CreatePermissionRequestPtr&, const ::Ehr::Signature&, const ::Ice::Context*); + +public: + + ::Ehr::Permissions listPermissions(const ::Ehr::ListPermissionsRequestPtr& request, const ::Ehr::Signature& requestorSignature) + { + return listPermissions(request, requestorSignature, 0); + } + ::Ehr::Permissions listPermissions(const ::Ehr::ListPermissionsRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Context& __ctx) + { + return listPermissions(request, requestorSignature, &__ctx); + } + +private: + + ::Ehr::Permissions listPermissions(const ::Ehr::ListPermissionsRequestPtr&, const ::Ehr::Signature&, const ::Ice::Context*); + +public: + + void removePermission(const ::Ehr::RemovePermissionRequestPtr& request, const ::Ehr::Signature& requestorSignature) + { + removePermission(request, requestorSignature, 0); + } + void removePermission(const ::Ehr::RemovePermissionRequestPtr& request, const ::Ehr::Signature& requestorSignature, const ::Ice::Context& __ctx) + { + removePermission(request, requestorSignature, &__ctx); + } + +private: + + void removePermission(const ::Ehr::RemovePermissionRequestPtr&, const ::Ehr::Signature&, const ::Ice::Context*); + +public: + + ::IceInternal::ProxyHandle ice_context(const ::Ice::Context& __context) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_context(__context).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_context(__context).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_adapterId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_adapterId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_adapterId(__id).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpoints(__endpoints).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locatorCacheTimeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locatorCacheTimeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionCached(bool __cached) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionCached(__cached).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionCached(__cached).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_endpointSelection(::Ice::EndpointSelectionType __est) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_endpointSelection(__est).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_endpointSelection(__est).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_secure(bool __secure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_secure(__secure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_secure(__secure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_preferSecure(bool __preferSecure) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_preferSecure(__preferSecure).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_router(const ::Ice::RouterPrx& __router) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_router(__router).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_router(__router).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_locator(const ::Ice::LocatorPrx& __locator) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_locator(__locator).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_locator(__locator).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_collocationOptimized(bool __co) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_collocationOptimized(__co).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_twoway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_twoway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_twoway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_oneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_oneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_oneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchOneway() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchOneway().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchOneway().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_datagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_datagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_datagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_batchDatagram() const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_batchDatagram().get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_batchDatagram().get()); + #endif + } + + ::IceInternal::ProxyHandle ice_compress(bool __compress) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_compress(__compress).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_compress(__compress).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_timeout(int __timeout) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_timeout(__timeout).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_timeout(__timeout).get()); + #endif + } + + ::IceInternal::ProxyHandle ice_connectionId(const std::string& __id) const + { + #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug + typedef ::IceProxy::Ice::Object _Base; + return dynamic_cast(_Base::ice_connectionId(__id).get()); + #else + return dynamic_cast(::IceProxy::Ice::Object::ice_connectionId(__id).get()); + #endif + } + + static const ::std::string& ice_staticId(); + +private: + + virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM(); + virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD(); + virtual ::IceProxy::Ice::Object* __newInstance() const; +}; + +} + +} + +namespace IceDelegate +{ + +namespace Ehr +{ + +class Document : virtual public ::IceDelegate::Ice::Object +{ +public: +}; + +class Prescription : virtual public ::IceDelegate::Ehr::Document +{ +public: +}; + +class ConsumedPrescription : virtual public ::IceDelegate::Ehr::Prescription +{ +public: +}; + +class Request : virtual public ::IceDelegate::Ice::Object +{ +public: +}; + +class ThirdPartyRequest : virtual public ::IceDelegate::Ehr::Request +{ +public: +}; + +class CreatePrescriptionRequest : virtual public ::IceDelegate::Ehr::ThirdPartyRequest +{ +public: +}; + +class ConsumePrescriptionRequest : virtual public ::IceDelegate::Ehr::ThirdPartyRequest +{ +public: +}; + +class ListDocumentsRequest : virtual public ::IceDelegate::Ehr::ThirdPartyRequest +{ +public: +}; + +class FindDocumentsRequest : virtual public ::IceDelegate::Ehr::ThirdPartyRequest +{ +public: +}; + +class CreatePermissionRequest : virtual public ::IceDelegate::Ehr::Request +{ +public: +}; + +class SetDefaultAccessRequest : virtual public ::IceDelegate::Ehr::Request +{ +public: +}; + +class ListPermissionsRequest : virtual public ::IceDelegate::Ehr::Request +{ +public: +}; + +class RemovePermissionRequest : virtual public ::IceDelegate::Ehr::Request +{ +public: +}; + +class Provider : virtual public ::IceDelegate::Ice::Object +{ +public: + + virtual void createPrescription(const ::Ehr::CreatePrescriptionRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Context*) = 0; + + virtual void consumePrescription(const ::Ehr::ConsumePrescriptionRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Context*) = 0; + + virtual ::Ehr::DocumentList listDocuments(const ::Ehr::ListDocumentsRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Context*) = 0; + + virtual ::Ehr::DocumentList findDocuments(const ::Ehr::FindDocumentsRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Context*) = 0; + + virtual void setDefaultAccess(const ::Ehr::SetDefaultAccessRequestPtr&, const ::Ehr::Signature&, const ::Ice::Context*) = 0; + + virtual void createPermission(const ::Ehr::CreatePermissionRequestPtr&, const ::Ehr::Signature&, const ::Ice::Context*) = 0; + + virtual ::Ehr::Permissions listPermissions(const ::Ehr::ListPermissionsRequestPtr&, const ::Ehr::Signature&, const ::Ice::Context*) = 0; + + virtual void removePermission(const ::Ehr::RemovePermissionRequestPtr&, const ::Ehr::Signature&, const ::Ice::Context*) = 0; +}; + +} + +} + +namespace IceDelegateM +{ + +namespace Ehr +{ + +class Document : virtual public ::IceDelegate::Ehr::Document, + virtual public ::IceDelegateM::Ice::Object +{ +public: +}; + +class Prescription : virtual public ::IceDelegate::Ehr::Prescription, + virtual public ::IceDelegateM::Ehr::Document +{ +public: +}; + +class ConsumedPrescription : virtual public ::IceDelegate::Ehr::ConsumedPrescription, + virtual public ::IceDelegateM::Ehr::Prescription +{ +public: +}; + +class Request : virtual public ::IceDelegate::Ehr::Request, + virtual public ::IceDelegateM::Ice::Object +{ +public: +}; + +class ThirdPartyRequest : virtual public ::IceDelegate::Ehr::ThirdPartyRequest, + virtual public ::IceDelegateM::Ehr::Request +{ +public: +}; + +class CreatePrescriptionRequest : virtual public ::IceDelegate::Ehr::CreatePrescriptionRequest, + virtual public ::IceDelegateM::Ehr::ThirdPartyRequest +{ +public: +}; + +class ConsumePrescriptionRequest : virtual public ::IceDelegate::Ehr::ConsumePrescriptionRequest, + virtual public ::IceDelegateM::Ehr::ThirdPartyRequest +{ +public: +}; + +class ListDocumentsRequest : virtual public ::IceDelegate::Ehr::ListDocumentsRequest, + virtual public ::IceDelegateM::Ehr::ThirdPartyRequest +{ +public: +}; + +class FindDocumentsRequest : virtual public ::IceDelegate::Ehr::FindDocumentsRequest, + virtual public ::IceDelegateM::Ehr::ThirdPartyRequest +{ +public: +}; + +class CreatePermissionRequest : virtual public ::IceDelegate::Ehr::CreatePermissionRequest, + virtual public ::IceDelegateM::Ehr::Request +{ +public: +}; + +class SetDefaultAccessRequest : virtual public ::IceDelegate::Ehr::SetDefaultAccessRequest, + virtual public ::IceDelegateM::Ehr::Request +{ +public: +}; + +class ListPermissionsRequest : virtual public ::IceDelegate::Ehr::ListPermissionsRequest, + virtual public ::IceDelegateM::Ehr::Request +{ +public: +}; + +class RemovePermissionRequest : virtual public ::IceDelegate::Ehr::RemovePermissionRequest, + virtual public ::IceDelegateM::Ehr::Request +{ +public: +}; + +class Provider : virtual public ::IceDelegate::Ehr::Provider, + virtual public ::IceDelegateM::Ice::Object +{ +public: + + virtual void createPrescription(const ::Ehr::CreatePrescriptionRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Context*); + + virtual void consumePrescription(const ::Ehr::ConsumePrescriptionRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Context*); + + virtual ::Ehr::DocumentList listDocuments(const ::Ehr::ListDocumentsRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Context*); + + virtual ::Ehr::DocumentList findDocuments(const ::Ehr::FindDocumentsRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Context*); + + virtual void setDefaultAccess(const ::Ehr::SetDefaultAccessRequestPtr&, const ::Ehr::Signature&, const ::Ice::Context*); + + virtual void createPermission(const ::Ehr::CreatePermissionRequestPtr&, const ::Ehr::Signature&, const ::Ice::Context*); + + virtual ::Ehr::Permissions listPermissions(const ::Ehr::ListPermissionsRequestPtr&, const ::Ehr::Signature&, const ::Ice::Context*); + + virtual void removePermission(const ::Ehr::RemovePermissionRequestPtr&, const ::Ehr::Signature&, const ::Ice::Context*); +}; + +} + +} + +namespace IceDelegateD +{ + +namespace Ehr +{ + +class Document : virtual public ::IceDelegate::Ehr::Document, + virtual public ::IceDelegateD::Ice::Object +{ +public: +}; + +class Prescription : virtual public ::IceDelegate::Ehr::Prescription, + virtual public ::IceDelegateD::Ehr::Document +{ +public: +}; + +class ConsumedPrescription : virtual public ::IceDelegate::Ehr::ConsumedPrescription, + virtual public ::IceDelegateD::Ehr::Prescription +{ +public: +}; + +class Request : virtual public ::IceDelegate::Ehr::Request, + virtual public ::IceDelegateD::Ice::Object +{ +public: +}; + +class ThirdPartyRequest : virtual public ::IceDelegate::Ehr::ThirdPartyRequest, + virtual public ::IceDelegateD::Ehr::Request +{ +public: +}; + +class CreatePrescriptionRequest : virtual public ::IceDelegate::Ehr::CreatePrescriptionRequest, + virtual public ::IceDelegateD::Ehr::ThirdPartyRequest +{ +public: +}; + +class ConsumePrescriptionRequest : virtual public ::IceDelegate::Ehr::ConsumePrescriptionRequest, + virtual public ::IceDelegateD::Ehr::ThirdPartyRequest +{ +public: +}; + +class ListDocumentsRequest : virtual public ::IceDelegate::Ehr::ListDocumentsRequest, + virtual public ::IceDelegateD::Ehr::ThirdPartyRequest +{ +public: +}; + +class FindDocumentsRequest : virtual public ::IceDelegate::Ehr::FindDocumentsRequest, + virtual public ::IceDelegateD::Ehr::ThirdPartyRequest +{ +public: +}; + +class CreatePermissionRequest : virtual public ::IceDelegate::Ehr::CreatePermissionRequest, + virtual public ::IceDelegateD::Ehr::Request +{ +public: +}; + +class SetDefaultAccessRequest : virtual public ::IceDelegate::Ehr::SetDefaultAccessRequest, + virtual public ::IceDelegateD::Ehr::Request +{ +public: +}; + +class ListPermissionsRequest : virtual public ::IceDelegate::Ehr::ListPermissionsRequest, + virtual public ::IceDelegateD::Ehr::Request +{ +public: +}; + +class RemovePermissionRequest : virtual public ::IceDelegate::Ehr::RemovePermissionRequest, + virtual public ::IceDelegateD::Ehr::Request +{ +public: +}; + +class Provider : virtual public ::IceDelegate::Ehr::Provider, + virtual public ::IceDelegateD::Ice::Object +{ +public: + + virtual void createPrescription(const ::Ehr::CreatePrescriptionRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Context*); + + virtual void consumePrescription(const ::Ehr::ConsumePrescriptionRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Context*); + + virtual ::Ehr::DocumentList listDocuments(const ::Ehr::ListDocumentsRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Context*); + + virtual ::Ehr::DocumentList findDocuments(const ::Ehr::FindDocumentsRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Context*); + + virtual void setDefaultAccess(const ::Ehr::SetDefaultAccessRequestPtr&, const ::Ehr::Signature&, const ::Ice::Context*); + + virtual void createPermission(const ::Ehr::CreatePermissionRequestPtr&, const ::Ehr::Signature&, const ::Ice::Context*); + + virtual ::Ehr::Permissions listPermissions(const ::Ehr::ListPermissionsRequestPtr&, const ::Ehr::Signature&, const ::Ice::Context*); + + virtual void removePermission(const ::Ehr::RemovePermissionRequestPtr&, const ::Ehr::Signature&, const ::Ice::Context*); +}; + +} + +} + +namespace Ehr +{ + +class Document : virtual public ::Ice::Object +{ +public: + + typedef DocumentPrx ProxyType; + typedef DocumentPtr PointerType; + + Document() {} + explicit Document(::Ehr::DocumentType); + virtual ::Ice::ObjectPtr ice_clone() const; + + virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const; + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const; + virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const; + static const ::std::string& ice_staticId(); + + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); + + static const ::Ice::ObjectFactoryPtr& ice_factory(); + +protected: + + virtual ~Document() {} + + friend class Document__staticInit; + +public: + + ::Ehr::DocumentType type; +}; + +class Document__staticInit +{ +public: + + ::Ehr::Document _init; +}; + +static Document__staticInit _Document_init; + +class Prescription : virtual public ::Ehr::Document +{ +public: + + typedef PrescriptionPrx ProxyType; + typedef PrescriptionPtr PointerType; + + Prescription() {} + Prescription(::Ehr::DocumentType, const ::std::string&, const ::std::string&, const ::std::string&, const ::Ehr::Date&, const ::std::string&, const ::Ehr::Date&, const ::std::string&, const ::std::string&, ::Ice::Int, const ::std::string&, const ::Ehr::Date&, const ::Ehr::Date&); + virtual ::Ice::ObjectPtr ice_clone() const; + + virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const; + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const; + virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const; + static const ::std::string& ice_staticId(); + + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); + + static const ::Ice::ObjectFactoryPtr& ice_factory(); + +protected: + + virtual ~Prescription() {} + +public: + + ::std::string originatorName; + + ::std::string originatorProfession; + + ::std::string originatorAddress; + + ::Ehr::Date creationDate; + + ::std::string consumerName; + + ::Ehr::Date consumerDateOfBirth; + + ::std::string drugDescription; + + ::std::string form; + + ::Ice::Int dosage; + + ::std::string measuringUnit; + + ::Ehr::Date validFrom; + + ::Ehr::Date expires; +}; + +class ConsumedPrescription : virtual public ::Ehr::Prescription +{ +public: + + typedef ConsumedPrescriptionPrx ProxyType; + typedef ConsumedPrescriptionPtr PointerType; + + ConsumedPrescription() {} + ConsumedPrescription(::Ehr::DocumentType, const ::std::string&, const ::std::string&, const ::std::string&, const ::Ehr::Date&, const ::std::string&, const ::Ehr::Date&, const ::std::string&, const ::std::string&, ::Ice::Int, const ::std::string&, const ::Ehr::Date&, const ::Ehr::Date&, const ::std::string&, const ::std::string&, const ::std::string&, const ::Ehr::Date&); + virtual ::Ice::ObjectPtr ice_clone() const; + + virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const; + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const; + virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const; + static const ::std::string& ice_staticId(); + + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); + + static const ::Ice::ObjectFactoryPtr& ice_factory(); + +protected: + + virtual ~ConsumedPrescription() {} + +public: + + ::std::string dispenserName; + + ::std::string dispenserProfession; + + ::std::string dispenserAddress; + + ::Ehr::Date dispensingDate; +}; + +class Request : virtual public ::Ice::Object +{ +public: + + typedef RequestPrx ProxyType; + typedef RequestPtr PointerType; + + Request() {} + Request(const ::Ehr::AccountIdentifier&, const ::Ehr::Timestamp&); + virtual ::Ice::ObjectPtr ice_clone() const; + + virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const; + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const; + virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const; + static const ::std::string& ice_staticId(); + + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); + + static const ::Ice::ObjectFactoryPtr& ice_factory(); + +protected: + + virtual ~Request() {} + +public: + + ::Ehr::AccountIdentifier requestor; + + ::Ehr::Timestamp when; +}; + +class ThirdPartyRequest : virtual public ::Ehr::Request +{ +public: + + typedef ThirdPartyRequestPrx ProxyType; + typedef ThirdPartyRequestPtr PointerType; + + ThirdPartyRequest() {} + ThirdPartyRequest(const ::Ehr::AccountIdentifier&, const ::Ehr::Timestamp&, const ::Ehr::AccountIdentifier&); + virtual ::Ice::ObjectPtr ice_clone() const; + + virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const; + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const; + virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const; + static const ::std::string& ice_staticId(); + + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); + + static const ::Ice::ObjectFactoryPtr& ice_factory(); + +protected: + + virtual ~ThirdPartyRequest() {} + +public: + + ::Ehr::AccountIdentifier owner; +}; + +class CreatePrescriptionRequest : virtual public ::Ehr::ThirdPartyRequest +{ +public: + + typedef CreatePrescriptionRequestPrx ProxyType; + typedef CreatePrescriptionRequestPtr PointerType; + + CreatePrescriptionRequest() {} + CreatePrescriptionRequest(const ::Ehr::AccountIdentifier&, const ::Ehr::Timestamp&, const ::Ehr::AccountIdentifier&, const ::Ehr::EncryptedDocument&); + virtual ::Ice::ObjectPtr ice_clone() const; + + virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const; + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const; + virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const; + static const ::std::string& ice_staticId(); + + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); + + static const ::Ice::ObjectFactoryPtr& ice_factory(); + +protected: + + virtual ~CreatePrescriptionRequest() {} + +public: + + ::Ehr::EncryptedDocument prescription; +}; + +class ConsumePrescriptionRequest : virtual public ::Ehr::ThirdPartyRequest +{ +public: + + typedef ConsumePrescriptionRequestPrx ProxyType; + typedef ConsumePrescriptionRequestPtr PointerType; + + ConsumePrescriptionRequest() {} + ConsumePrescriptionRequest(const ::Ehr::AccountIdentifier&, const ::Ehr::Timestamp&, const ::Ehr::AccountIdentifier&, ::Ice::Long, const ::Ehr::EncryptedDocument&); + virtual ::Ice::ObjectPtr ice_clone() const; + + virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const; + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const; + virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const; + static const ::std::string& ice_staticId(); + + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); + + static const ::Ice::ObjectFactoryPtr& ice_factory(); + +protected: + + virtual ~ConsumePrescriptionRequest() {} + +public: + + ::Ice::Long prescriptionId; + + ::Ehr::EncryptedDocument consumedPrescription; +}; + +class ListDocumentsRequest : virtual public ::Ehr::ThirdPartyRequest +{ +public: + + typedef ListDocumentsRequestPrx ProxyType; + typedef ListDocumentsRequestPtr PointerType; + + ListDocumentsRequest() {} + ListDocumentsRequest(const ::Ehr::AccountIdentifier&, const ::Ehr::Timestamp&, const ::Ehr::AccountIdentifier&); + virtual ::Ice::ObjectPtr ice_clone() const; + + virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const; + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const; + virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const; + static const ::std::string& ice_staticId(); + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); + + static const ::Ice::ObjectFactoryPtr& ice_factory(); + +protected: + + virtual ~ListDocumentsRequest() {} +}; + +class FindDocumentsRequest : virtual public ::Ehr::ThirdPartyRequest +{ +public: + + typedef FindDocumentsRequestPrx ProxyType; + typedef FindDocumentsRequestPtr PointerType; + + FindDocumentsRequest() {} + FindDocumentsRequest(const ::Ehr::AccountIdentifier&, const ::Ehr::Timestamp&, const ::Ehr::AccountIdentifier&, bool, const ::Ehr::Timestamp&, bool, const ::Ehr::Timestamp&, ::Ehr::DocumentType, ::Ice::Long); + virtual ::Ice::ObjectPtr ice_clone() const; + + virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const; + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const; + virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const; + static const ::std::string& ice_staticId(); + + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); + + static const ::Ice::ObjectFactoryPtr& ice_factory(); + +protected: + + virtual ~FindDocumentsRequest() {} + +public: + + bool hasFrom; + + ::Ehr::Timestamp from; + + bool hasTill; + + ::Ehr::Timestamp till; + + ::Ehr::DocumentType type; + + ::Ice::Long documentId; +}; + +class CreatePermissionRequest : virtual public ::Ehr::Request +{ +public: + + typedef CreatePermissionRequestPrx ProxyType; + typedef CreatePermissionRequestPtr PointerType; + + CreatePermissionRequest() {} + CreatePermissionRequest(const ::Ehr::AccountIdentifier&, const ::Ehr::Timestamp&, ::Ice::Long, const ::Ehr::AccountIdentifier&, ::Ehr::AccessType); + virtual ::Ice::ObjectPtr ice_clone() const; + + virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const; + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const; + virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const; + static const ::std::string& ice_staticId(); + + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); + + static const ::Ice::ObjectFactoryPtr& ice_factory(); + +protected: + + virtual ~CreatePermissionRequest() {} + +public: + + ::Ice::Long documentId; + + ::Ehr::AccountIdentifier account; + + ::Ehr::AccessType access; +}; + +class SetDefaultAccessRequest : virtual public ::Ehr::Request +{ +public: + + typedef SetDefaultAccessRequestPrx ProxyType; + typedef SetDefaultAccessRequestPtr PointerType; + + SetDefaultAccessRequest() {} + SetDefaultAccessRequest(const ::Ehr::AccountIdentifier&, const ::Ehr::Timestamp&, ::Ice::Long, ::Ehr::AccessType); + virtual ::Ice::ObjectPtr ice_clone() const; + + virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const; + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const; + virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const; + static const ::std::string& ice_staticId(); + + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); + + static const ::Ice::ObjectFactoryPtr& ice_factory(); + +protected: + + virtual ~SetDefaultAccessRequest() {} + +public: + + ::Ice::Long documentId; + + ::Ehr::AccessType access; +}; + +class ListPermissionsRequest : virtual public ::Ehr::Request +{ +public: + + typedef ListPermissionsRequestPrx ProxyType; + typedef ListPermissionsRequestPtr PointerType; + + ListPermissionsRequest() {} + ListPermissionsRequest(const ::Ehr::AccountIdentifier&, const ::Ehr::Timestamp&, ::Ice::Long); + virtual ::Ice::ObjectPtr ice_clone() const; + + virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const; + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const; + virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const; + static const ::std::string& ice_staticId(); + + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); + + static const ::Ice::ObjectFactoryPtr& ice_factory(); + +protected: + + virtual ~ListPermissionsRequest() {} + +public: + + ::Ice::Long documentId; +}; + +class RemovePermissionRequest : virtual public ::Ehr::Request +{ +public: + + typedef RemovePermissionRequestPrx ProxyType; + typedef RemovePermissionRequestPtr PointerType; + + RemovePermissionRequest() {} + RemovePermissionRequest(const ::Ehr::AccountIdentifier&, const ::Ehr::Timestamp&, ::Ice::Long, ::Ice::Long); + virtual ::Ice::ObjectPtr ice_clone() const; + + virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const; + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const; + virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const; + static const ::std::string& ice_staticId(); + + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); + + static const ::Ice::ObjectFactoryPtr& ice_factory(); + +protected: + + virtual ~RemovePermissionRequest() {} + +public: + + ::Ice::Long documentId; + + ::Ice::Long permissionId; +}; + +class Provider : virtual public ::Ice::Object +{ +public: + + typedef ProviderPrx ProxyType; + typedef ProviderPtr PointerType; + + virtual ::Ice::ObjectPtr ice_clone() const; + + virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const; + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const; + virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const; + static const ::std::string& ice_staticId(); + + virtual void createPrescription(const ::Ehr::CreatePrescriptionRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Current& = ::Ice::Current()) = 0; + ::Ice::DispatchStatus ___createPrescription(::IceInternal::Incoming&, const ::Ice::Current&); + + virtual void consumePrescription(const ::Ehr::ConsumePrescriptionRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Current& = ::Ice::Current()) = 0; + ::Ice::DispatchStatus ___consumePrescription(::IceInternal::Incoming&, const ::Ice::Current&); + + virtual ::Ehr::DocumentList listDocuments(const ::Ehr::ListDocumentsRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Current& = ::Ice::Current()) = 0; + ::Ice::DispatchStatus ___listDocuments(::IceInternal::Incoming&, const ::Ice::Current&); + + virtual ::Ehr::DocumentList findDocuments(const ::Ehr::FindDocumentsRequestPtr&, const ::Ehr::Signature&, const ::Ehr::Signature&, const ::Ice::Current& = ::Ice::Current()) = 0; + ::Ice::DispatchStatus ___findDocuments(::IceInternal::Incoming&, const ::Ice::Current&); + + virtual void setDefaultAccess(const ::Ehr::SetDefaultAccessRequestPtr&, const ::Ehr::Signature&, const ::Ice::Current& = ::Ice::Current()) = 0; + ::Ice::DispatchStatus ___setDefaultAccess(::IceInternal::Incoming&, const ::Ice::Current&); + + virtual void createPermission(const ::Ehr::CreatePermissionRequestPtr&, const ::Ehr::Signature&, const ::Ice::Current& = ::Ice::Current()) = 0; + ::Ice::DispatchStatus ___createPermission(::IceInternal::Incoming&, const ::Ice::Current&); + + virtual ::Ehr::Permissions listPermissions(const ::Ehr::ListPermissionsRequestPtr&, const ::Ehr::Signature&, const ::Ice::Current& = ::Ice::Current()) = 0; + ::Ice::DispatchStatus ___listPermissions(::IceInternal::Incoming&, const ::Ice::Current&); + + virtual void removePermission(const ::Ehr::RemovePermissionRequestPtr&, const ::Ehr::Signature&, const ::Ice::Current& = ::Ice::Current()) = 0; + ::Ice::DispatchStatus ___removePermission(::IceInternal::Incoming&, const ::Ice::Current&); + + virtual ::Ice::DispatchStatus __dispatch(::IceInternal::Incoming&, const ::Ice::Current&); + + virtual void __write(::IceInternal::BasicStream*) const; + virtual void __read(::IceInternal::BasicStream*, bool); + virtual void __write(const ::Ice::OutputStreamPtr&) const; + virtual void __read(const ::Ice::InputStreamPtr&, bool); +}; + +} + +#endif diff --git a/task1/ehr.ice b/task1/ehr.ice new file mode 100644 index 0000000..aba39ee --- /dev/null +++ b/task1/ehr.ice @@ -0,0 +1,302 @@ +//! SE/Linux EHR IDL file +//! Author: SE/Linux team +module Ehr { + + sequence ByteSeq; + + //! Base class for exceptions + exception EhrException { + string what; //! Detailed error message. + }; + + //! The request could not be validated. + exception InvalidRequestException extends EhrException { }; + //! An account specified in the request is invalid. + exception InvalidAccountException extends InvalidRequestException { }; + //! The signature of the request could not be verified. + exception SignatureException extends EhrException { }; + //! The requestor is not allowed to perform the request. + exception PermissionDeniedException extends EhrException { }; + + //! Identifies an account in the SEPM/Linux EHR system + struct AccountIdentifier { + string user; //! User part of account + string provider; //! Provider part of account + }; + + enum DocumentType { + DOCANY, + DOCPRESCRIPTION, + DOCCONSUMEDPRESCRIPTION + }; + + //! The signature of a request. + //! + //! To calculate the signature of a request object, the request object is + //! serialized (converted to a byte stream) using the streaming interface. + //! See chapter 36.2 (Streaming Interface) of the ICE manual for details. + //! + //! Then, the SHA1 hash of the byte stream is calculated and encrypted using + //! the private key of the account that issued the request. + //! See EVP_SignInit(3SSL) for details. + //! + //! This signature logic is implemented in Security::sign + struct Signature { + ByteSeq data; + }; + + struct Timestamp { + //! The time since the Epoch (00:00:00 UTC, January 1, 1970), + //! measured in milliseconds. + long msecs; + }; + + struct Date { + byte day; + byte month; + short year; + }; + + enum AccessType { + ALLOW, //! Allow access + DENY //! Deny access + }; + + //! An envelope encrypted serialized document. + //! + //! The document is a class or structure serialized (converted to a byte stream) + //! using the ICE streaming interface. + //! See chapter 36.2 (Streaming Interface) of the ICE manual for details. + //! + //! The byte stream is encrypted using envolope encryption: it is encrypted with + //! a symetric cipher (AES) using a random key. This key is then encrypted with + //! the public key (RSA) of the owner. + //! + //! See EVP_SealInit(3) for details on envelope encryption. + //! + //! This encryption logic is also implemented in Security::encryptPublic. + struct EncryptedDocument { + //! AES key encrypted with the RSA public key of the owner. + ByteSeq encryptedKey; + //! The initial vector for AES (aes_256_cbc). + ByteSeq initialVector; + //! Document encrypted with AES (aes_256_cbc). + ByteSeq encryptedData; + }; + + //! Base class for documents in the EHR. + class Document { + //! The document type. + DocumentType type; + }; + + //! The prescription document created by the physician. + class Prescription extends Document { + + string originatorName; + string originatorProfession; + string originatorAddress; + + Date creationDate; + + string consumerName; + Date consumerDateOfBirth; + + string drugDescription; + string form; + int dosage; + string measuringUnit; + + Date validFrom; + Date expires; + }; + + //! The prescription consumption created by the pharmacist. + //! It contains a copy of the original prescription. + class ConsumedPrescription extends Prescription { + + string dispenserName; + string dispenserProfession; + string dispenserAddress; + + Date dispensingDate; + }; + + //! Base class for a request to a provider node. + class Request { + //! The account that issued the request. + AccountIdentifier requestor; + + //! Timestamp when the request was issued. + //! A reasonable provider node validates the timestamp, for example: + //! (timestamp_last_request_from_requestor < when) && (when < now() + 1_min) + //! The first condition guarantees that requests can't be reused. + Timestamp when; + }; + + //! Base class for requests where two parties are involved, for example + //! a patient and a pharmacist. + class ThirdPartyRequest extends Request { + //! The account that owns the EHR (patient). + AccountIdentifier owner; + }; + + //! Request to creaete a prescription. + //! Issued by a physician and aproved by the patient. + class CreatePrescriptionRequest extends ThirdPartyRequest { + //! A serialized Prescription encrypted with the public key of the patient. + EncryptedDocument prescription; + }; + + //! Issued by a pharmacist and aproved by the patient. + class ConsumePrescriptionRequest extends ThirdPartyRequest { + //! Id of the prescription to consume + long prescriptionId; + //! The serialized ConsumePrescription encrypted with the public key of the patient. + EncryptedDocument consumedPrescription; + }; + + //! Request to list all documents in an EHR. + //! Issued by anyone. + //! Aproved by the patient. + class ListDocumentsRequest extends ThirdPartyRequest { + }; + + //! Request to find documents in an EHR. + //! Issued by anyone. + //! Aproved by the patient. + class FindDocumentsRequest extends ThirdPartyRequest { + bool hasFrom; //! If true, the from field is valid. + Timestamp from; //! Search documents older than from. + bool hasTill; //! If true, the till field is valid. + Timestamp till; //! Search documents younger than till. + + //! Search only documents of the given type. + //! Set to DOCANY if the document type does not matter. + DocumentType type; + + //! Search only document with the giben ID. + //! Set to 0 if the ID does not matter. + long documentId; + }; + + //! Request to create a pemission on a document. + //! Issued by patient only. + class CreatePermissionRequest extends Request { + //! The id of the document. + long documentId; + //! The account the permission belongs to. + AccountIdentifier account; + //! The access type (ALLOW, DENY). + AccessType access; + }; + + //! Request to set the default permission on a docment. + //! The default permission determines, whether access is granted to an + //! account, for which there is no explicit permission available. + //! Issued by patient only. + class SetDefaultAccessRequest extends Request { + //! The id of the document. + long documentId; + //! The access type (ALLOW, DENY). + AccessType access; + }; + + //! Request to request the list of permissions on a document. + //! Issued by patient only. + class ListPermissionsRequest extends Request { + //! The id of the document. + long documentId; + }; + + //! Request to remove a permission form a document. + //! Issued by patient only. + class RemovePermissionRequest extends Request { + //! The id of the document. + long documentId; + //! The id of the permission to remove. + long permissionId; + }; + + //! Combines an encrypted document with an id. + struct DocumentListItem { + long id; + Timestamp created; + EncryptedDocument document; + }; + + sequence DocumentList; + + //! Combines a permission with an id. + struct AccessControlListItem { + long id; + AccountIdentifier account; + AccessType access; + }; + + sequence AccessControlList; + + //! The permissions for a document. + struct Permissions { + //! Default permission, if there is no explicit permission in the acl. + AccessType defaultAccess; + //! Per account permissions. + AccessControlList acl; + }; + + //! The interface of a provider node for client software. + //! + //! Every method has the following arguments: + //! + //! - A request object. + //! - The signature of the request object by the requesting party. + //! - If the requetor is different form the owner of the EHR (for example + //! a pharmacist), the signature of the owner of the EHR. + interface Provider { + + void createPrescription( + CreatePrescriptionRequest request, + Signature requestorSignature, + Signature ownerSignature + ) throws EhrException; + + void consumePrescription( + ConsumePrescriptionRequest request, + Signature requestorSignature, + Signature ownerSignature + ) throws EhrException; + + DocumentList listDocuments( + ListDocumentsRequest request, + Signature requestorSignature, + Signature ownerSignature + ) throws EhrException; + + DocumentList findDocuments( + FindDocumentsRequest request, + Signature requestorSignature, + Signature ownerSignature + ) throws EhrException; + + void setDefaultAccess( + SetDefaultAccessRequest request, + Signature requestorSignature + ) throws EhrException; + + void createPermission( + CreatePermissionRequest request, + Signature requestorSignature + ) throws EhrException; + + Permissions listPermissions( + ListPermissionsRequest request, + Signature requestorSignature + ) throws EhrException; + + void removePermission( + RemovePermissionRequest request, + Signature requestorSignature + ) throws EhrException; + + }; +}; diff --git a/task1/ehrclient.cpp b/task1/ehrclient.cpp new file mode 100644 index 0000000..ec3c2c1 --- /dev/null +++ b/task1/ehrclient.cpp @@ -0,0 +1,496 @@ +/** + * $Id: ehrclient.cpp 2 2009-10-31 02:48:23Z l0728348 $ + * + * Copyright 2009 + * + * @author Manuel Mausz (0728348) + * @brief implements the main routines of the console application + */ + +#include +#include +#include +#include +#include +#include +#include "ehrclient.h" +#include "getoptwrapper.h" +#include "cairodocument.h" +#include "utils.h" + +using namespace std; +using namespace Ehr; + +int EhrClient::run(int argc, char *argv[]) +{ + /* setup commandline option */ + CommandOption optnode("node", 0, "The object identifier string used to connect to the EHR provider node", CommandOption::needArg); + CommandOption optreq("requestor", 0, "The PEM file containing the requestors certifcate and private key for signing", CommandOption::needArg); + CommandOption optowner("owner", 0, "The PEM file containing the patients certifcate and private key for signing", CommandOption::needArg); + CommandOption optlist("list", 0, "Display a list of all documents available in the patient's EHR", CommandOption::noArg); + CommandOption optdoc("document", 0, "The ID of the document selected for exporting to PDF", CommandOption::needArg); + CommandOption optout("output", 0, "The output file", CommandOption::needArg); + CommandOption opthelp("help", 0, "Display this help and exit", CommandOption::noArg); + CommandOptionParse opts(argc, argv, "Allowed options"); + opts.addSynopsis("--node --requestor --owner --list"); + opts.addSynopsis("--node --requestor --owner --document --output "); + + /* error during parsing or help-option set */ + if (!opts.parse() || opts["help"]) + { + cerr << opts; + return EXIT_FAILURE; + } + + /* check commandline option combinations */ + try + { + /* missing mandatory options */ + if (!opts["node"] || !opts["requestor"] || !opts["owner"] + || (!opts["list"] && !opts["document"])) + throw runtime_error("missing mandatory commandline options"); + + /* list-option needs to be alone (and vica-versa) */ + if (opts["list"] && (opts["document"] || opts["output"])) + throw runtime_error("unable to combine these commandline options"); + + /* document-option needs output-option */ + if (opts["document"] && !opts["output"]) + throw runtime_error("--document needs --output"); + + /* don't allow options to occur multiple times */ + if (opts["node"] > 1 || opts["requestor"] > 1 || opts["owner"] > 1 + || opts["list"] > 1 || opts["document"] > 1 || opts["output"] > 1) + throw runtime_error("commandline options may occur only once"); + } + catch(runtime_error& ex) + { + cerr << appName() << ": " << ex.what() << endl + << opts; + return EXIT_FAILURE; + } + + /* save for later */ + m_ownercert = opts["owner"].value(); + m_requestorcert = opts["requestor"].value(); + + /* set some properties */ + Ice::PropertiesPtr props = communicator()->getProperties(); + if (props->getProperty("IceSSL.CertAuthFile").empty()) + props->setProperty("IceSSL.CertAuthFile", "./certs/rootca.pem"); + props->setProperty("IceSSL.CertFile", m_requestorcert); + + /* load plugins */ + Ice::PluginManagerPtr pluginmgr = communicator()->getPluginManager(); + pluginmgr->initializePlugins(); + + /* get security instance */ + m_security = &Security::instance(); + + /* get provider proxy */ + Ice::ObjectPrx base = communicator()->stringToProxy(opts["node"]); + if (!(m_provider = ProviderPrx::checkedCast(base))) + throw runtime_error("error - invalid node or doesn't exist"); + + try + { + if (opts["list"]) + listDocuments(); + else if (opts["document"] && opts["output"]) + { + long docid; + try + { + docid = Utils::lexical_cast(opts["document"].value()); + } + catch(Utils::bad_lexical_cast& ex) + { + throw runtime_error("error - invalid document-parameter - not a number"); + } + if (docid <= 0) + throw runtime_error("error - invalid document-parameter - only positive numbers"); + saveDocument(docid, opts["output"]); + } + } + catch(EhrException& e) + { + throw runtime_error("error - " + e.what); + } + + return 0; +} + +/*----------------------------------------------------------------------------*/ + +#include +Ehr::DocumentList EhrClient::getDocumentList() +{ + /* fill in request */ + ListDocumentsRequestPtr request = new ListDocumentsRequest(); + pair cnowner = splitCN(m_ownercert); + pair cnrequestor = splitCN(m_requestorcert); + request->owner.user = cnowner.first; + request->owner.provider = cnowner.second; + request->requestor.user = cnrequestor.first; + request->requestor.provider = cnrequestor.second; + request->when.msecs = getTime(); + + /* objects containing the signature */ + Signature requestor; + Signature owner; + + /* sign the request */ + vector data = convertToByteStream(request); + m_security->sign(m_requestorcert, data, requestor.data); + m_security->sign(m_ownercert, data, owner.data); + + /* execute */ + return m_provider->listDocuments(request, requestor, owner); +} + +/*----------------------------------------------------------------------------*/ + +Ehr::DocumentList EhrClient::searchDocument(const bool hasFrom, const long from, + const bool hasTill, const long till, + const Ehr::DocumentType doctype, const long docid) +{ + /* fill in request */ + FindDocumentsRequestPtr request = new FindDocumentsRequest(); + pair cnowner = splitCN(m_ownercert); + pair cnrequestor = splitCN(m_requestorcert); + request->owner.user = cnowner.first; + request->owner.provider = cnowner.second; + request->requestor.user = cnrequestor.first; + request->requestor.provider = cnrequestor.second; + request->when.msecs = getTime(); + request->hasFrom = hasFrom; + request->from.msecs = from; + request->hasTill = hasTill; + request->from.msecs = till; + request->type = doctype; + request->documentId = docid; + + /* objects containing the signature */ + Signature requestor; + Signature owner; + + /* sign the request */ + vector data = convertToByteStream(request); + m_security->sign(m_requestorcert, data, requestor.data); + m_security->sign(m_ownercert, data, owner.data); + + /* execute */ + return m_provider->findDocuments(request, requestor, owner); +} + +/*----------------------------------------------------------------------------*/ + +void EhrClient::listDocuments() +{ + /* get document list */ + DocumentList doclist = getDocumentList(); + DocumentPtr doc = new Document(); + + /* print the list */ + cout << "Documentlist for " << m_security->getCommonName(m_ownercert) << ":" << endl; + if (doclist.size() != 0) + { + for(unsigned i = 0; i < doclist.size(); ++i) + { + /* decrypt our document */ + vector data; + m_security->decryptPrivate(m_ownercert, doclist[i].document.encryptedData, + doclist[i].document.initialVector, doclist[i].document.encryptedKey, data); + Ice::InputStreamPtr in = Ice::createInputStream(communicator(), data); + ice_readDocument(in, doc); + in->readPendingObjects(); + + cout << " ID#" << doclist[i].id + << " " << getDate(doclist[i].created.msecs) + << endl; + if (doc->type == DOCPRESCRIPTION || doc->type == DOCCONSUMEDPRESCRIPTION) + { + PrescriptionPtr presc = PrescriptionPtr::dynamicCast(doc); + cout << " Orginator: " << presc->originatorName << ", " << presc->originatorProfession << endl + << " Parmaceutical: " << presc->drugDescription << endl + << " Valid: " << getDate(presc->validFrom) << " - " << getDate(presc->expires) << endl; + } + + cout << endl; + } + } + else + cout << "There are no documents available" << endl; +} + +/*----------------------------------------------------------------------------*/ + +void EhrClient::saveDocument(const long docid, const std::string& output) +{ + /* first check if file already exist */ + ifstream ifile(output.c_str()); + if (ifile) + throw runtime_error("error - output file already exist"); + ifile.close(); + + /* search for document */ + DocumentList doclist = searchDocument(docid); + if (doclist.size() == 0) + throw runtime_error("error - document not found"); + else if (doclist.size() > 1) + throw runtime_error("error - document exists multiple times"); + + /* decrypt our document */ + DocumentPtr doc = new Document(); + vector data; + m_security->decryptPrivate(m_ownercert, doclist[0].document.encryptedData, + doclist[0].document.initialVector, doclist[0].document.encryptedKey, data); + Ice::InputStreamPtr in = Ice::createInputStream(communicator(), data); + ice_readDocument(in, doc); + in->readPendingObjects(); + + if (doc->type == DOCPRESCRIPTION || doc->type == DOCCONSUMEDPRESCRIPTION) + { + PrescriptionPtr presc = PrescriptionPtr::dynamicCast(doc); + + /* create our pdf document */ + //CairoDocument cairodoc(210, 148); // A6 lanscape + CairoDocument cairodoc(148, 105); // A5 landscape + CairoColor colblack(0, 0, 0); + CairoColor colgrey(0.5, 0.5, 0.5); + CairoFont fontsmall(7, "sans-serif"); + CairoFont fontbig(10, "sans-serif"); + + /* set default */ + cairodoc.add(fontbig).add(colblack); + + /* our current position */ + double docleft = 0; + double doctop = 0; + double docwidth = cairodoc.width(); + double docheight = cairodoc.height(); + double padding = 3; + + /* add document border */ + CairoRectangle docborder(docleft += padding, doctop += padding, + docwidth -= 2 * padding, docheight -= 2 * padding, 0.2); + cairodoc.add(docborder); + + /* add inner padding */ + docleft += padding; + doctop += padding; + docwidth -= 2 * padding; + docheight -= 2 * padding; + + /* add consumer name + label */ + double boxleftwith = (docwidth - docleft) * 3 / 4; + double boxleftwithin = boxleftwith - padding; + CairoTextBox consumerlabel(docleft, doctop, boxleftwithin, fontsmall.height()); + consumerlabel << "Consumer name:"; + cairodoc.add(consumerlabel.add(colgrey).add(fontsmall)); + doctop += consumerlabel.height(); + + CairoTextBox consumername(docleft, doctop, boxleftwithin, fontbig.height()); + consumername << presc->consumerName; + cairodoc.add(consumername); + doctop += consumername.height(); + + /* add consumer birth + label */ + doctop += 1; + CairoTextBox consumerdatelabel(docleft, doctop, boxleftwithin, fontsmall.height(), 0); + consumerdatelabel << "Date of birth:"; + cairodoc.add(consumerdatelabel.add(colgrey).add(fontsmall)); + doctop += consumerdatelabel.height(); + + CairoTextBox consumerdate(docleft, doctop, boxleftwithin, fontbig.height()); + consumerdate << getDate(presc->consumerDateOfBirth); + cairodoc.add(consumerdate); + doctop += consumerdate.height(); + + /* put that in a box */ + CairoRectangle consumerborder(docborder.x(), docborder.y(), + docleft - docborder.x() + boxleftwith, doctop - docborder.y() + padding); + cairodoc.add(consumerborder); + doctop += 2 * padding; + + /* add originator */ + CairoTextBox originatorlabel(docleft, doctop, boxleftwithin, fontsmall.height()); + originatorlabel << "Originator:"; + cairodoc.add(originatorlabel.add(colgrey).add(fontsmall)); + doctop += originatorlabel.height(); + + CairoTextBox originator(docleft, doctop, boxleftwithin, fontbig.height() * 2); + originator << presc->originatorName << ", " << presc->originatorProfession + << "\n" << presc->originatorAddress; + cairodoc.add(originator); + doctop += originator.height(); + + /* put that in a box */ + CairoRectangle originatorborder(docborder.x(), docborder.y(), + docleft - docborder.x() + boxleftwith, originator.y() + originator.height()); + cairodoc.add(originatorborder); + doctop += 2 * padding; + + /* add left box */ + double boxrightx = consumerlabel.x() + boxleftwith; + double boxrighty = docborder.y(); + double boxrightwidth = docborder.x() + docborder.width() - boxrightx; + CairoRectangle datesborder(boxrightx, boxrighty, boxrightwidth, originator.y() + originator.height()); + cairodoc.add(datesborder); + + /* add inner padding */ + double boxrightxin = boxrightx + padding; + boxrighty += padding; + double boxrightwidthin = boxrightwidth - 2 * padding; + + /* add creation date */ + CairoTextBox createdlabel(boxrightxin, boxrighty, boxrightwidthin, fontsmall.height()); + createdlabel << "Created on:"; + cairodoc.add(createdlabel.add(colgrey).add(fontsmall)); + boxrighty += consumerlabel.height(); + + CairoTextBox created(boxrightxin, boxrighty, boxrightwidthin, fontbig.height()); + created << getDate(presc->creationDate); + cairodoc.add(created); + boxrighty += created.height(); + boxrighty += 1; + + /* add valid from date */ + CairoTextBox validfromlabel(boxrightxin, boxrighty, boxrightwidthin, fontsmall.height()); + validfromlabel << "Valid from:"; + cairodoc.add(validfromlabel.add(colgrey).add(fontsmall)); + boxrighty += validfromlabel.height(); + + CairoTextBox valid(boxrightxin, boxrighty, boxrightwidthin, fontbig.height()); + valid << getDate(presc->validFrom); + cairodoc.add(valid); + boxrighty += valid.height(); + boxrighty += 1; + + /* add expire date */ + CairoTextBox expirelabel(boxrightxin, boxrighty, boxrightwidthin, fontsmall.height()); + expirelabel << "Expire on:"; + cairodoc.add(expirelabel.add(colgrey).add(fontsmall)); + boxrighty += expirelabel.height(); + + CairoTextBox expire(boxrightxin, boxrighty, boxrightwidthin, fontbig.height()); + expire << getDate(presc->expires); + cairodoc.add(expire); + + /* add drug */ + CairoTextBox druglabel(docleft, doctop, docwidth, fontsmall.height()); + druglabel << "Pharmaceutical:"; + cairodoc.add(druglabel.add(colgrey).add(fontsmall)); + doctop += druglabel.height(); + + CairoTextBox drug(docleft, doctop, docwidth, fontbig.height()); + drug << presc->drugDescription + << "\n" << presc->dosage << " " << presc->measuringUnit + << ", " << presc->form; + cairodoc.add(drug); + + if (doc->type == DOCCONSUMEDPRESCRIPTION) + { + ConsumedPrescriptionPtr presc2 = ConsumedPrescriptionPtr::dynamicCast(doc); + + /* add consumed prescreption */ + double boxbottomy = docborder.y() + docborder.height() - + (2 * padding + 2 * fontbig.height() + fontsmall.height()); + CairoRectangle consumedborder(docborder.x(), boxbottomy, docleft - docborder.x() + boxleftwith, + docborder.height() - boxbottomy + docborder.x()); + cairodoc.add(consumedborder); + + double boxbottomyin = boxbottomy + padding; + CairoTextBox consumedlabel(docleft, boxbottomyin, boxleftwithin, fontsmall.height()); + consumedlabel << "Consumed by:"; + cairodoc.add(consumedlabel.add(colgrey).add(fontsmall)); + + CairoTextBox consumeddatelabel(boxrightxin, boxbottomyin, boxrightwidth, fontsmall.height()); + consumeddatelabel << "Consumed on:"; + cairodoc.add(consumeddatelabel.add(colgrey).add(fontsmall)); + boxbottomyin += consumedlabel.height(); + + CairoTextBox consumed(docleft, boxbottomyin, boxleftwithin, fontbig.height() * 2); + consumed << presc2->dispenserName << ", " << presc2->dispenserProfession + << "\n" << presc2->dispenserAddress; + cairodoc.add(consumed); + + CairoTextBox consumedon(boxrightxin, boxbottomyin, boxrightwidth, fontbig.height()); + consumedon << getDate(presc2->dispensingDate); + cairodoc.add(consumedon); + + /* add consumed date border */ + CairoRectangle consumedborder2(boxrightx, boxbottomy, boxrightwidth, + docborder.height() - boxbottomy + docborder.x()); + cairodoc.add(consumedborder2); + } + + cairodoc.save(output, CairoDocument::PDF); + } + else + throw runtime_error("error - unsupported document type"); + + return; +} + +/*----------------------------------------------------------------------------*/ + +long EhrClient::getTime() +{ + /* get time in milliseconds */ + struct timeval tv; + gettimeofday(&tv, NULL); + return tv.tv_sec * 1000 + tv.tv_usec / 1000; +} + +/*----------------------------------------------------------------------------*/ + +std::string EhrClient::getDate(long msecs) +{ + struct tm doctime; + const time_t timep = msecs / 1000; + localtime_r(&timep, &doctime); + stringstream out(""); + out << doctime.tm_mday << "." << doctime.tm_mon << "." << doctime.tm_year + 1900 + << " " << doctime.tm_hour << ':' << doctime.tm_min << ':' << doctime.tm_sec; + return out.str(); +} + +/*----------------------------------------------------------------------------*/ + +std::string EhrClient::getDate(const Ehr::Date& date) +{ + stringstream out(""); + out << static_cast(date.day) << "." << static_cast(date.month) + << "." << date.year; + return out.str(); +} + +/*----------------------------------------------------------------------------*/ + +vector EhrClient::convertToByteStream(const Ice::ObjectPtr& request) +{ + /* in order to sign our request, we need to convert + * the request to a bytestream first + */ + Ice::OutputStreamPtr out = Ice::createOutputStream(communicator()); + vector data; + out->writeObject(request); + out->writePendingObjects(); + out->finished(data); + return data; +} + +/*----------------------------------------------------------------------------*/ + +std::pair EhrClient::splitCN(const std::string& cert) +{ + /* parse requestor details from cert */ + string commonname = m_security->getCommonName(cert); + size_t pos = commonname.find_first_of('@'); + if (pos == string::npos) + throw runtime_error("error - commonname of cert \"" + cert + "\" doesn't have user@provider syntax"); + return pair(commonname.substr(0, pos), commonname.substr(pos + 1)); +} + +/* vim: set et sw=2 ts=2: */ diff --git a/task1/ehrclient.h b/task1/ehrclient.h new file mode 100644 index 0000000..2654000 --- /dev/null +++ b/task1/ehrclient.h @@ -0,0 +1,164 @@ +/** + * $Id: ehrclient.h 2 2009-10-31 02:48:23Z l0728348 $ + * + * Copyright 2009 + * + * @author Manuel Mausz (0728348) + * @brief implements the main routines of the console application + */ + +#ifndef EHRCLIENT_H +#define EHRCLIENT_H + +#include +#include +#include +#include +#include +#include "ehr.h" +#include "security.h" + +/** + * implements the main routines of the console application + */ +class EhrClient +: virtual public Ice::Application +{ + public: + /** + * @brief exception thrown by EhrClient + */ + class runtime_error : public std::runtime_error { + public: + /** + * @brief Default exception ctor + * @param what message to pass along + */ + runtime_error(const std::string& what) + : std::runtime_error(what) + {} + }; + + /** + * @brief main routine + * gets called by Ice after internal setup + * @param argc argc from main + * @param argv argv from main + */ + virtual int run(int argc, char *argv[]); + + /** + * @brief retrieves and returns documentlist from server + * @return list of documents + */ + Ehr::DocumentList getDocumentList(); + + /** + * @brief search for documents using parameters + * @param hasFrom set true to consider from parameter + * @param from value for from parameter + * @param hasTill set true to consider till parameter + * @param till value for till parameter + * @param doctype document type to search for + * @param docid document id to search for + * @return list of documents + * @throw Ehr::EhrException + */ + Ehr::DocumentList searchDocument(const bool hasFrom = false, const long from = 0, + const bool hasTill = false, const long till = 0, + const Ehr::DocumentType doctype = Ehr::DOCANY, const long docid = 0); + + /** + * @brief overloaded method for searching for documents + * @param from value for from parameter + * @param till value for till parameter + * @return list of documents + * @throw Ehr::EhrException + */ + Ehr::DocumentList searchDocument(const long from, const long till) + { + return searchDocument(true, from, true, till); + } + + /** + * @brief overloaded method for searching for documents + * @param doctype document type to search for + * @return list of documents + * @throw Ehr::EhrException + */ + Ehr::DocumentList searchDocument(const Ehr::DocumentType doctype) + { + return searchDocument(false, 0, false, 0, doctype); + } + + /** + * @brief overloaded method for searching for documents + * @param docid document id to search for + * @return list of documents + * @throw Ehr::EhrException + */ + Ehr::DocumentList searchDocument(const long docid) + { + return searchDocument(false, 0, false, 0, Ehr::DOCANY, docid); + } + + /** + * @brief list all document on server on console output + */ + void listDocuments(); + + /** + * @brief retrieves document with documentid, generates a pdf document + * and stores it as output on disc + * @param docid document id + * @param output filename to store the pdf document + * @throw EhrClient::runtime_error + */ + void saveDocument(const long docid, const std::string& output); + + /** + * @brief get current time in milliseconds + * @return current time in milliseconds + */ + long getTime(); + + /** + * @brief generate date string + * @param msecs time in milliseconds since 01.01.1900 00:00 + * @return string containing the date. syntax: dd.mm.yyyy + */ + std::string getDate(long msecs); + + /** + * @brief generate date string + * @param date date in Ehr::Date format + * @return string containing the date. syntax: dd.mm.yyyy + */ + std::string getDate(const Ehr::Date& date); + + /** + * @brief convert ice request to bytestream + * @param request ice request to convert + * @return converted bytestream containing the request + */ + std::vector convertToByteStream(const Ice::ObjectPtr& request); + + /** + * @brief split commonname (syntax user @ domain) of certificate + * into user and domain + * @param cert certificate which contains the commonname + * @return pair of user and domain + * @throw EhrClient::runtime_error + */ + std::pair splitCN(const std::string& cert); + + private: + Ehr::ProviderPrx m_provider; + Security *m_security; + std::string m_ownercert; + std::string m_requestorcert; +}; + +#endif + +/* vim: set et sw=2 ts=2: */ diff --git a/task1/getoptwrapper.cpp b/task1/getoptwrapper.cpp new file mode 100644 index 0000000..1efd603 --- /dev/null +++ b/task1/getoptwrapper.cpp @@ -0,0 +1,191 @@ +/** + * $Id: getoptwrapper.cpp 2 2009-10-31 02:48:23Z l0728348 $ + * + * Copyright 2009 + * + * @author Manuel Mausz (0728348) + * @brief Wraps around getopt_long() using two classes + * class CommandOption represents a valid commandline option + * class CommandOptionParse calls getopt_long + * and generates usage message + */ + +#include +#include +#include +#include +#include +#include "getoptwrapper.h" + +using namespace std; + +CommandOptionParse::CommandOptionList cmdoptionlist; + +/*----------------------------------------------------------------------------*/ + +const std::string CommandOption::printParameters() +{ + ostringstream oss; + + if (!m_longopt.empty() && m_shortopt != 0) + oss << "-" << m_shortopt << " [ --" << m_longopt << " ]"; + else if (!m_longopt.empty() && m_shortopt == 0) + oss << "--" << m_longopt; + else if (m_longopt.empty() && m_shortopt != 0) + oss << "-" << m_shortopt; + + if (m_type == needArg) + oss << " arg"; + else if (m_type == optArg) + oss << " [ arg ]"; + + return oss.str(); +} + +/*----------------------------------------------------------------------------*/ + +void CommandOption::foundOption(const char *value) +{ + m_count++; + if (value != NULL) + m_value = value; +} + +/*----------------------------------------------------------------------------*/ + +bool CommandOptionParse::parse() +{ + CommandOptionList::iterator it; + + /* build optstring */ + m_optstring = ""; + for (it = m_cmdlist.begin(); it != m_cmdlist.end(); ++it) + { + CommandOption *opt = *it; + if (opt->m_shortopt == 0) + continue; + + m_optstring += opt->m_shortopt; + if (opt->m_type == CommandOption::needArg) + m_optstring += ':'; + if (opt->m_type == CommandOption::optArg) + m_optstring += "::"; + } + + /* build longopts */ + if (m_longopts != NULL) + delete[] m_longopts; + m_longopts = new option[m_cmdlist.size() + 1]; + int i = 0; + for (it = m_cmdlist.begin(); it != m_cmdlist.end(); ++it) + { + CommandOption *opt = *it; + if (opt->m_longopt.empty()) + continue; + + m_longopts[i].name = opt->m_longopt.c_str(); + m_longopts[i].has_arg = opt->m_type; + m_longopts[i].flag = 0; + m_longopts[i].val = 0; + ++i; + } + + /* append NULL-row */ + m_longopts[i].name = 0; + m_longopts[i].has_arg = 0; + m_longopts[i].flag = 0; + m_longopts[i].val = 0; + + //opterr = 0; // no errors from getopt_long! + int opt; + int optindex = 0; + while ((opt = getopt_long(m_argc, m_argv, m_optstring.c_str(), m_longopts, &optindex)) != -1) + { + if (opt == '?') + return 0; + + for (it = m_cmdlist.begin(); it != m_cmdlist.end(); ++it) + { + CommandOption *option = *it; + if (opt == 0) + { + if (option->m_longopt == m_longopts[optindex].name) + option->foundOption(optarg); + } + else if (opt == option->m_shortopt) + option->foundOption(optarg); + } + } + + return 1; +} + +/*----------------------------------------------------------------------------*/ + +const std::string CommandOptionParse::usage() +{ + ostringstream oss; + string me(m_argv[0]); + + /* build usage/synopsis */ + oss << "Usage: "; + if (!m_synopsis.empty()) + { + oss << me << " " << m_synopsis.at(0) << endl; + for (unsigned i = 1; i < m_synopsis.size(); ++i) + oss << " " << me << " " << m_synopsis.at(i) << endl; + } + else + oss << me << " [OPTION]..." << endl; + + /* find maximum width of options */ + CommandOptionList::iterator it; + unsigned width = 20; // default + for (it = m_cmdlist.begin(); it != m_cmdlist.end(); ++it) + { + stringstream tmpss; + tmpss << (*it)->printParameters(); + width = (max)(width, static_cast(tmpss.str().size())); + } + width += 2; + + /* print allowed options + description */ + oss << endl << m_description << ":" << endl; + for (it = m_cmdlist.begin(); it != m_cmdlist.end(); ++it) + { + oss << " " << setw(width) << left << (*it)->printParameters() + << (*it)->m_description << endl; + } + + return oss.str(); +} + +/*----------------------------------------------------------------------------*/ + +CommandOption& CommandOptionParse::operator[](const std::string& longopt) +{ + CommandOptionList::iterator it; + for (it = m_cmdlist.begin(); it != m_cmdlist.end(); ++it) + { + CommandOption *opt = *it; + if (opt->m_longopt == longopt) + return *opt; + } + throw out_of_range("option not found"); +} + +/*----------------------------------------------------------------------------*/ + +CommandOption& CommandOptionParse::operator[](const char shortopt) +{ + CommandOptionList::iterator it; + for (it = m_cmdlist.begin(); it != m_cmdlist.end(); ++it) + { + CommandOption *opt = *it; + if (opt->m_shortopt == shortopt) + return *opt; + } + throw out_of_range("option not found"); +} + +/* vim: set et sw=2 ts=2: */ diff --git a/task1/getoptwrapper.h b/task1/getoptwrapper.h new file mode 100644 index 0000000..21270f7 --- /dev/null +++ b/task1/getoptwrapper.h @@ -0,0 +1,231 @@ +/** + * $Id: getoptwrapper.h 2 2009-10-31 02:48:23Z l0728348 $ + * + * Copyright 2009 + * + * @author Manuel Mausz (0728348) + * @brief Wraps around getopt_long() using two classes + * class CommandOption represents a valid commandline option + * class CommandOptionParse calls getopt_long + * and generates usage message + */ + +#ifndef GETOPTWRAPPER_H +#define GETOPTWRAPPER_H + +#include +#include +#include +#if !defined(_GNU_SOURCE) +# define _GNU_SOURCE +#endif +#include + +/* forward declarations */ +class CommandOption; +class CommandOptionParse; + +/** default list containing commandline options */ +extern std::list cmdoptionlist; + +/** + * every instance of CommandOption represents a valid commandline option + * use CommandOptionParse to parse them + */ +class CommandOption +{ + /* be friend with CommandOptionParse so it can use our privates */ + friend class CommandOptionParse; + + public: + /** commandline option argument */ + enum Type + { + noArg = 0, /* no argument */ + needArg = 1, /* argument required */ + optArg = 2, /* argument optional */ + }; + + /** + * @brief Default ctor. Adds commandline option to commandline list + * @param longopt long commandline option. empty string to omit + * @param shortopt short commandline option. 0 to omit + * @param description description. will be printed in usage + * @param type type of argument + * @param cmdlist list to add this commandline option + */ + CommandOption(const std::string& longopt, const char shortopt, const std::string& description, + const Type& type, std::list& cmdlist = cmdoptionlist) + : m_longopt(longopt), m_shortopt(shortopt), m_description(description), + m_type(type), m_count(0), m_value("") + { + if (!m_longopt.empty() || m_shortopt != 0) + cmdlist.push_back(this); + } + + /** + * @brief Default dtor + */ + virtual ~CommandOption() + {} + + /** + * @brief generate a usage string/valid syntax + * for this commandline option + * @return usage string for this commandline option + */ + const std::string printParameters(); + + /** + * @brief get number of commandline matches found + * @return number of commandline matches found + */ + unsigned count() + { + return m_count; + } + + /** + * @brief get number of commandline matches found + * @return number of commandline matches found + */ + operator unsigned() + { + return count(); + } + + /** + * @brief returns first valid commandline option argument + * if the commandline option is found a second time, + * the argument is omitted + * @return first valid argument for this commandline option + */ + const std::string value() + { + return m_value; + } + + /** + * @brief returns first valid commandline option argument + * if the commandline option is found a second time, + * the argument is omitted + * @return first valid argument for this commandline option + */ + operator std::string() + { + return value(); + } + + private: + /** + * @brief gets called by CommandOptionParse if the commandline option + * is found. Parses and stores the argument. Only the first call + * will be stored. + * @param value commandline option argument + */ + void foundOption(const char *value); + + std::string m_longopt; + char m_shortopt; + std::string m_description; + Type m_type; + unsigned m_count; + std::string m_value; +}; + +/*----------------------------------------------------------------------------*/ + +/** + * parses argc/argv using getopt_long and a list of instances of CommandOption + * also generates usage message + */ +class CommandOptionParse +{ + public: + /** list of pointers of CommandOption */ + typedef std::list CommandOptionList; + + /** + * @brief Default ctor. + * @param argc argc of main + * @param argv argv of main + * @param description will be printed in usage before CommandOption list + * @param cmdlist list to add this commandline option + */ + CommandOptionParse(int argc, char* argv[], const std::string& description, + std::list& cmdlist = cmdoptionlist) + : m_argc(argc), m_argv(argv), m_description(description), m_cmdlist(cmdlist), + m_longopts(NULL) + {} + + /** + * @brief Default dtor. + */ + virtual ~CommandOptionParse() + { + if (m_longopts != NULL) + delete[] m_longopts; + } + + /** + * @brief adds valid synopsis to usage message + * @param synopsis synopsis + */ + void addSynopsis(const std::string& synopsis) + { + m_synopsis.push_back(synopsis); + } + + /** + * @brief starts parsing argc/argv + * @return true on success. false otherwise + */ + bool parse(); + + /** + * @brief generates usage message + * @return usage message as string + */ + const std::string usage(); + + /** + * @brief generates usage message and prints them on ostream + * @return reference to ostream + */ + friend std::ostream& operator<<(std::ostream& os, CommandOptionParse& cmdoptions) + { + os << cmdoptions.usage(); + return os; + } + + /** + * @brief directly access a valid/parsed commandline option + * using its longopt parameter + * @param longopt parameter "longopt" of commandline option + * @return reference to commandline option + * @throw std::out_of_range if the commandline option cannot be found + */ + CommandOption& operator[](const std::string& longopt); + + /** + * @brief directly access a valid/parsed commandline option + * using its shortopt parameter + * @param shortopt parameter "shortopt" of commandline option + * @return reference to commandline option + * @throw std::out_of_range if the commandline option cannot be found + */ + CommandOption& operator[](const char shortopt); + + private: + int m_argc; + char **m_argv; + std::string m_description; + CommandOptionList m_cmdlist; + std::vector m_synopsis; + std::string m_optstring; + struct option *m_longopts; +}; + +#endif + +/* vim: set et sw=2 ts=2: */ diff --git a/task1/security.cpp b/task1/security.cpp new file mode 100644 index 0000000..d092be0 --- /dev/null +++ b/task1/security.cpp @@ -0,0 +1,330 @@ +/** + * Wrapper for OpenSSL cryptographic functions. + * @author SE/Linux Team + */ + +#include "security.h" + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +//! Implementation of the Security interface. +//! We didn't put this declaration into the public header, beacause it +//! contains OpenSSL related IMPLEMENTATION DETAILS. +class SecurityImpl : public Security { + + public: + + virtual void sign( + const std::string& privateKeyFile, + const ByteStream& data, + ByteStream& output + ); + + virtual void verifySignature( + const std::string& certificateFile, + const ByteStream& data, + const ByteStream& signature + ); + + virtual void encryptPublic( + const std::string& certificateFile, + const ByteStream& data, + ByteStream& iv, + ByteStream& ek, + ByteStream& output + ); + + virtual void decryptPrivate( + const std::string& privateKeyFile, + const ByteStream& data, + const ByteStream& iv, + const ByteStream& ek, + ByteStream& output + ); + + virtual std::string getCommonName( + const std::string& certificateFile + ); + + private: + + //! Opens the given file. + //! @throws SecurityException on error. + FILE *openFile(const std::string& file); + + //! Throws an SecurityException containing the last OpenSSL error. + void throwSslError(); + + //! Reads a private key from the given file. + //! @throws SecurityException on error. + EVP_PKEY* readPrivKey(const std::string& file); + + //! Reads a public key from the given certificate file. + //! @throws SecurityException on error. + EVP_PKEY* readPubKey(const std::string& file); + + //! Reads a X509 certificate from the given certificate file. + //! @throws SecurityException on error. + X509 *readX509(const std::string& file); +}; + +// ----------------------------------------------------------------------------- +// SecurityException +// ----------------------------------------------------------------------------- + +SecurityException::SecurityException(const std::string& what) : + _what(what) +{ +} + +// ----------------------------------------------------------------------------- +// Security +// ----------------------------------------------------------------------------- + +Security& Security::instance() { + if (_instance == 0) { + _instance = new SecurityImpl(); + } + return *_instance; +} + +Security *Security::_instance = 0; + +// ----------------------------------------------------------------------------- +// SecurityImpl +// ----------------------------------------------------------------------------- + +FILE *SecurityImpl::openFile(const std::string& file) { + FILE *ret = fopen(file.c_str(), "r"); + if (ret == NULL) { + std::ostringstream os; + os << "Could not open file " << file << ": " << strerror(errno); + throw SecurityException(os.str()); + } + return ret; +} + +void SecurityImpl::throwSslError() { + ERR_print_errors_fp(stderr); + throw SecurityException("ssl error"); +} + +EVP_PKEY* SecurityImpl::readPrivKey(const std::string& file) { + FILE *f = NULL; + EVP_PKEY *ret = NULL; + + f = openFile(file); + ret = PEM_read_PrivateKey(f, NULL, NULL, NULL); + fclose(f); + + if (! ret) { + throwSslError(); + } + + return ret; +} + +X509 *SecurityImpl::readX509(const std::string& file) { + FILE *f = openFile(file); + X509 *ret = PEM_read_X509(f, NULL, NULL, NULL); + fclose(f); + + if (!ret) { + throwSslError(); + } + return ret; +} + +void SecurityImpl::sign( + const std::string& privateKeyFile, + const ByteStream& data, + ByteStream& output + ) { + EVP_PKEY *priv = readPrivKey(privateKeyFile); + EVP_MD_CTX ctx; + + EVP_SignInit(&ctx, EVP_sha1()); + EVP_SignUpdate(&ctx, &data[0], data.size()); + output.resize(EVP_PKEY_size(priv)); + unsigned int len = output.size(); + int err = EVP_SignFinal(&ctx, &output[0], &len, priv); + + EVP_PKEY_free(priv); + EVP_MD_CTX_cleanup(&ctx); + + if (err == 1) { + output.resize(len); + } else { + throwSslError(); + } +} + +void SecurityImpl::verifySignature( + const std::string& certificateFile, + const ByteStream& data, + const ByteStream& signature + ) { + X509 *x509 = readX509(certificateFile); + EVP_PKEY *pub = X509_get_pubkey(x509); + bool ok = true; + int err; + + if (pub == NULL) { + ok = false; + goto failout; + } + + EVP_MD_CTX ctx; + EVP_VerifyInit(&ctx, EVP_sha1()); + EVP_VerifyUpdate(&ctx, &data[0], data.size()); + err = EVP_VerifyFinal(&ctx, const_cast(&signature[0]), signature.size(), pub); + + if (err != 1) { + ok = false; + goto failout; + } + +failout: + + if (pub) EVP_PKEY_free(pub); + if (x509) X509_free(x509); + if (! ok) throwSslError(); +} + +void SecurityImpl::encryptPublic( + const std::string& certificateFile, + const ByteStream& data, + ByteStream& iv, + ByteStream& ek, + ByteStream& output + ) { + X509 *x509 = readX509(certificateFile); + EVP_PKEY *pub = X509_get_pubkey(x509); + bool ok = true; + int len, len2; + + const EVP_CIPHER *cipher = EVP_aes_256_cbc(); + EVP_CIPHER_CTX ctx; + + ek.resize(EVP_PKEY_size(pub)); + int ekl = ek.size(); + Byte *ek2 = &ek[0]; + + iv.resize(EVP_CIPHER_iv_length(cipher)); + + if (! EVP_SealInit(&ctx, cipher, &ek2, &ekl, &iv[0], &pub, 1)) { + ok = false; + goto failout; + } + + ek.resize(ekl); + + output.resize( + data.size() + EVP_CIPHER_block_size(cipher) - 1 + // for update + EVP_CIPHER_block_size(cipher) // for final + ); + len = output.size(); + + if (! EVP_SealUpdate(&ctx, &output[0], &len, &data[0], data.size())) { + ok = false; + goto failout; + } + len2 = output.size() - len; + + if (! EVP_SealFinal(&ctx, &output[len], &len2)) { + ok = false; + goto failout; + } + output.resize(len + len2); + +failout: + + if (pub) EVP_PKEY_free(pub); + if (x509) X509_free(x509); + if (! ok) throwSslError(); +} + +void SecurityImpl::decryptPrivate( + const std::string& privateKeyFile, + const ByteStream& data, + const ByteStream& iv, + const ByteStream& ek, + ByteStream& output + ) { + EVP_PKEY *priv = readPrivKey(privateKeyFile); + + const EVP_CIPHER *cipher = EVP_aes_256_cbc(); + EVP_CIPHER_CTX ctx; + int len, len2; + bool ok = true; + + output.resize(data.size() + EVP_CIPHER_block_size(cipher)); + + if (!EVP_OpenInit( + &ctx, cipher, + const_cast(&ek[0]), ek.size(), + const_cast(&iv[0]), + priv + )) { + ok = false; + goto failout; + } + if (!EVP_OpenUpdate(&ctx, &output[0], &len, &data[0], data.size())) { + ok = false; + goto failout; + } + if (!EVP_OpenFinal(&ctx, &output[len], &len2)) { + ok = false; + goto failout; + } + + output.resize(len + len2); + +failout: + + if (priv) EVP_PKEY_free(priv); + if (!ok) throwSslError(); +} + +std::string SecurityImpl::getCommonName( + const std::string& certificateFile + ) { + X509 *x509 = readX509(certificateFile); + X509_NAME *subj = 0; + char data[256]; + bool ok = true; + + subj = X509_get_subject_name(x509); + + if (subj == 0) { + ok = false; + goto failout; + } + + if (! X509_NAME_get_text_by_NID(subj, NID_commonName, data, sizeof(data))) { + ok = false; + goto failout; + } + +failout: + + X509_free(x509); + + if (!ok) { + throwSslError(); + } + return data; + +} diff --git a/task1/security.h b/task1/security.h new file mode 100644 index 0000000..b85266c --- /dev/null +++ b/task1/security.h @@ -0,0 +1,119 @@ +/** + * Wrapper for OpenSSL cryptographic functions. + * @author SE/Linux Team + * + * NOTE: you need to link with -lcrypto when using this class! + */ + +#ifndef _SECURITY_H +#define _SECURITY_H + +#include +#include +#include + +#include // For Ice::Byte + +//! Exception thrown by security class +class SecurityException : public std::exception { + public: + //! Construtor. + //! @param what Error message. + SecurityException(const std::string& what); + //! Returns the error message + virtual const char *what() const throw() { return _what.c_str(); } + virtual ~SecurityException() throw() {} + private: + std::string _what; +}; + +//! Interface of the Security class. +//! Use the instance() member to get the singleton instance. +class Security { + + public: + virtual ~Security() + {}; + + //! Definition of Byte, for compatibility with ICE. + typedef Ice::Byte Byte; + + //! Vector (sequence) of Bytes. + typedef std::vector ByteStream; + + //! Returns the singleton Security instance. + static Security& instance(); + + //! Encrypts binary data using envelope encryption (RSA + aes_256_cbc). + //! See the man page for EVP_SealInit(3SSL) for an explenation of envelope + //! ecnryption. + //! @param certificateFile Path to certificate in PEM format used for + //! encryption. + //! @param data Data to encrypt. + //! @param iv Output parameter. Randoml initia vector for AES. + //! @param ek Output parameter. Ramdom AES key encrypted with RSA. + //! @param output Output paramenter. Encrypted data. + //! @throws SecurityException on error. + virtual void encryptPublic( + const std::string& certificateFile, + const ByteStream& data, + ByteStream& iv, + ByteStream& ek, + ByteStream& output + ) = 0; + + //! Decrypts binary data using envelope encryption (RSA + aes_256_cbc) + //! See the man page for EVP_SealInit(3SSL) for an expenation of envelope + //! ecnryption. + //! @param privateKeyFile Path to private key in PEM format used for + //! decryption. + //! @param data Data to decrypt. + //! @param iv Initial vector for AES. + //! @param ek Key for AES encrypted with RSA. + //! @param output. Output parameter. Decrypted data. + //! @throws SecurityException on error. + virtual void decryptPrivate( + const std::string& privateKeyFile, + const ByteStream& data, + const ByteStream& iv, + const ByteStream& ek, + ByteStream& output + ) = 0; + + //! Signs binary data using SHA1 + RSA. + //! @param privateKeyFile Path to private key in PEM format used for + //! encryption. + //! @param data Data to sign. + //! @param output Output parameter. The signature. + //! @throws SecurityException on error. + virtual void sign( + const std::string& privateKeyFile, + const ByteStream& data, + ByteStream& output + ) = 0; + + //! Verifies a signature using SHA1 + RSA. + //! @param certificateFile Path to certificate file in PEM format used for + //! decryption. + //! @param data Data to verify. + //! @param signature Signature to verify. + //! @throws SecurityException On error or if the signature could not be verified. + virtual void verifySignature( + const std::string& certificateFile, + const ByteStream& data, + const ByteStream& signature + ) = 0; + + //! Returns the common name (CN) field of a certificate. + //! @param certificateFile Path to certificate in PEM format. + //! @throws SecurityException on error. + virtual std::string getCommonName( + const std::string& certificateFile + ) = 0; + + private: + + static Security *_instance; +}; + +#endif diff --git a/task1/utils.h b/task1/utils.h new file mode 100644 index 0000000..fefa24e --- /dev/null +++ b/task1/utils.h @@ -0,0 +1,53 @@ +/** + * $Id: utils.h 2 2009-10-31 02:48:23Z l0728348 $ + * + * Copyright 2009 + * + * @author Manuel Mausz (0728348) + * @brief implements some common utility functions, methods and templates + * available in namespace Utils. + */ + +#ifndef UTILS_H +#define UTILS_H + +#include +#include + +namespace Utils +{ + /** + * @brief exception thrown by lexical_cast + */ + class bad_lexical_cast : public std::runtime_error { + public: + /** + * @brief Default exception ctor + * @param what message to pass along + */ + bad_lexical_cast(const std::string& what) + : std::runtime_error(what) + {} + }; + + /** + * @brief simple implementation of boost::lexical_cast + * can be used to convert string to number + * mainly uses operator<< of stringstream + * @param source source value + * @return target target value + **/ + template + Target lexical_cast(const Source& source) + { + Target target; + std::stringstream interpreter; + if(!(interpreter << source && interpreter >> target && interpreter.get() == std::char_traits::eof())) + throw bad_lexical_cast("bad lexical cast"); + return target; + }; +}; + +#endif + +/* vim: set et sw=2 ts=2: */ -- cgit v1.2.3