diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-04-13 09:14:34 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-04-13 09:14:34 +0000 |
commit | b4aa63207a91edc4fee016877c048f3c862bcb71 (patch) | |
tree | bd1cb1a7a30677c39ac9b065528d1ceed89d3d69 /cpp/demo/Ice/session/HelloSessionI.cpp | |
parent | added Makefile .depend. (diff) | |
download | ice-b4aa63207a91edc4fee016877c048f3c862bcb71.tar.bz2 ice-b4aa63207a91edc4fee016877c048f3c862bcb71.tar.xz ice-b4aa63207a91edc4fee016877c048f3c862bcb71.zip |
moved session impl into seperate file.
Diffstat (limited to 'cpp/demo/Ice/session/HelloSessionI.cpp')
-rw-r--r-- | cpp/demo/Ice/session/HelloSessionI.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/cpp/demo/Ice/session/HelloSessionI.cpp b/cpp/demo/Ice/session/HelloSessionI.cpp new file mode 100644 index 00000000000..2f8dbedeec2 --- /dev/null +++ b/cpp/demo/Ice/session/HelloSessionI.cpp @@ -0,0 +1,55 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2005 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. +// +// ********************************************************************** + +#include <Ice/Ice.h> + +#include <HelloSessionI.h> + +using namespace std; + +HelloSessionI::HelloSessionI(const SessionManagerIPtr& manager) : + _manager(manager) +{ +} + +HelloSessionI::~HelloSessionI() +{ +} + +void +HelloSessionI::sayHello(const Ice::Current&) const +{ + cout << "Hello World!" << endl; +} + +// +// Destroy all session specific state. +// +void +HelloSessionI::destroyed(const Ice::Current& c) +{ + c.adapter->remove(c.id); +} + +// +// This method is called by the client to destroy a session. All +// it should do is call remove on the session manager. All user +// specific cleanup should go in the destroyed() callback. +// +void +HelloSessionI::destroy(const Ice::Current& c) +{ + _manager->remove(c.id); +} + +void +HelloSessionI::refresh(const Ice::Current& c) +{ + _manager->refresh(c.id); +} |