1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
#ifndef TEST_CONFIGURATION_H
#define TEST_CONFIGURATION_H
#include <IceUtil/IceUtil.h>
#include <Ice/UniquePtr.h>
#include <Ice/LocalException.h>
#include <Ice/Selector.h>
#ifndef TEST_API
# if defined(ICE_STATIC_LIBS)
# define TEST_API /**/
# elif defined(TEST_API_EXPORTS)
# define TEST_API ICE_DECLSPEC_EXPORT
# else
# define TEST_API ICE_DECLSPEC_IMPORT
# endif
#endif
class Configuration;
typedef IceUtil::Handle<Configuration> ConfigurationPtr;
class TEST_API Configuration : public IceUtil::Shared, public IceUtil::Mutex
{
public:
Configuration();
virtual ~Configuration();
void connectorsException(Ice::LocalException*);
void checkConnectorsException();
void connectException(Ice::LocalException*);
void checkConnectException();
void initializeSocketOperation(IceInternal::SocketOperation);
void initializeException(Ice::LocalException*);
IceInternal::SocketOperation initializeSocketOperation();
void checkInitializeException();
void readReady(bool);
void readException(Ice::LocalException*);
bool readReady();
void checkReadException();
void writeReady(bool);
void writeException(Ice::LocalException*);
bool writeReady();
void checkWriteException();
void buffered(bool);
bool buffered();
static Configuration* getInstance();
private:
IceInternal::UniquePtr<Ice::LocalException> _connectorsException;
IceInternal::UniquePtr<Ice::LocalException> _connectException;
IceInternal::SocketOperation _initializeSocketOperation;
int _initializeResetCount;
IceInternal::UniquePtr<Ice::LocalException> _initializeException;
int _readReadyCount;
IceInternal::UniquePtr<Ice::LocalException> _readException;
int _writeReadyCount;
IceInternal::UniquePtr<Ice::LocalException> _writeException;
bool _buffered;
static Configuration* _instance;
};
#endif
|