summaryrefslogtreecommitdiff
path: root/cpp/demo/Glacier/session/HelloSessionI.h
blob: 2c8e6bbee891807def0a03b242246b9a0a1e45eb (plain)
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
// **********************************************************************
//
// Copyright (c) 2001
// ZeroC, Inc.
// Huntsville, AL, USA
//
// All Rights Reserved
//
// **********************************************************************

#ifndef HELLO_SESSION_I_H
#define HELLO_SESSION_I_H

#include <Glacier/SessionManager.h>
#include <HelloSession.h>

class HelloSessionManagerI : public Glacier::SessionManager
{
public:

    HelloSessionManagerI(const Ice::ObjectAdapterPtr&);

    virtual Glacier::SessionPrx create(const ::std::string&, const Ice::Current&);

    void remove(const Ice::Identity&);

private:

    Ice::ObjectAdapterPtr _adapter;
};
typedef IceUtil::Handle<HelloSessionManagerI> HelloSessionManagerIPtr;

class HelloSessionI : public HelloSession
{
public:

    HelloSessionI(const ::std::string&, const HelloSessionManagerIPtr&);

    virtual void destroy(const Ice::Current&);
    virtual void hello(const Ice::Current&);

private:

    ::std::string _userId;
    HelloSessionManagerIPtr _manager;
};

#endif