blob: 955013cb08da5011e9787d28e1ed73cd407fbab8 (
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
|
// **********************************************************************
//
// 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.
//
// **********************************************************************
#ifndef SESSION_I_H
#define SESSION_I_H
#include <Ice/Ice.h>
#include <Session.h>
#include <list>
class SessionI : public Demo::Session, public IceUtil::Mutex
{
public:
SessionI(const std::string&);
virtual Demo::HelloPrx createHello(const Ice::Current&);
virtual void refresh(const Ice::Current&);
virtual std::string getName(const Ice::Current&) const;
virtual void destroy(const Ice::Current&);
IceUtil::Time timestamp() const;
private:
const std::string _name;
IceUtil::Time _timestamp; // The last time the session was refreshed.
int _nextId; // The per-session id of the next hello object. This is used for tracing purposes.
std::list<Demo::HelloPrx> _objs; // List of per-session allocated hello objects.
bool _destroy;
};
typedef IceUtil::Handle<SessionI> SessionIPtr;
#endif
|