/usr/include/Glacier2/SessionHelper.h is in libzeroc-ice35-dev 3.5.1-6.4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | // **********************************************************************
//
// Copyright (c) 2003-2013 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.
//
// **********************************************************************
#ifndef GLACIER2_SESSION_HELPER_H
#define GLACIER2_SESSION_HELPER_H
#include <IceUtil/Shared.h>
#include <IceUtil/Handle.h>
#include <IceUtil/Thread.h>
#include <IceUtil/Mutex.h>
#include <Ice/Initialize.h>
#include <Ice/Properties.h>
#include <Ice/Communicator.h>
#include <Ice/ObjectAdapter.h>
#include <Ice/Ice.h>
#include <Glacier2/Session.h>
#include <Glacier2/Router.h>
#include <map>
#include <string>
namespace Glacier2
{
const int GLACIER2_SSL_PORT = 4064;
const int GLACIER2_TCP_PORT = 4063;
class GLACIER2_API SessionHelper : public IceUtil::Shared
{
public:
virtual void destroy() = 0;
virtual Ice::CommunicatorPtr communicator() const = 0;
virtual std::string categoryForClient() const = 0;
virtual Ice::ObjectPrx addWithUUID(const Ice::ObjectPtr&) = 0;
virtual Glacier2::SessionPrx session() const = 0;
virtual bool isConnected() const = 0;
virtual Ice::ObjectAdapterPtr objectAdapter() = 0;
bool operator==(const Glacier2::SessionHelper&) const;
bool operator!=(const Glacier2::SessionHelper&) const;
};
typedef IceUtil::Handle<SessionHelper> SessionHelperPtr;
class GLACIER2_API SessionCallback : virtual public IceUtil::Shared
{
public:
virtual void createdCommunicator(const SessionHelperPtr& session) = 0;
virtual void connected(const SessionHelperPtr&) = 0;
virtual void disconnected(const SessionHelperPtr&) = 0;
virtual void connectFailed(const SessionHelperPtr&, const Ice::Exception&) = 0;
};
typedef IceUtil::Handle<SessionCallback> SessionCallbackPtr;
class GLACIER2_API SessionFactoryHelper : public IceUtil::Shared
{
public:
SessionFactoryHelper(const SessionCallbackPtr& callback);
SessionFactoryHelper(const Ice::InitializationData&, const SessionCallbackPtr&);
SessionFactoryHelper(const Ice::PropertiesPtr&, const SessionCallbackPtr&);
void setRouterIdentity(const Ice::Identity&);
Ice::Identity getRouterIdentity() const;
void setRouterHost(const std::string&);
std::string getRouterHost() const;
void setSecure(bool);
bool getSecure() const;
void setTimeout(int);
int getTimeout() const;
void setPort(int port);
int getPort() const;
Ice::InitializationData getInitializationData() const;
void setConnectContext(std::map<std::string, std::string> context);
SessionHelperPtr connect();
SessionHelperPtr connect(const std::string&, const std::string&);
private:
Ice::InitializationData createInitData();
void setDefaultProperties();
IceUtil::Mutex _mutex;
std::string _routerHost;
Ice::Identity _identity;
bool _secure;
int _port;
int _timeout;
Ice::InitializationData _initData;
SessionCallbackPtr _callback;
std::map< std::string, std::string> _context;
};
typedef IceUtil::Handle<SessionFactoryHelper> SessionFactoryHelperPtr;
}
#endif
|