X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fsession.hpp;h=4c9094a5722368acf962d006d5ddb0f944c8f15b;hb=779166ef71fd082438f80b1e6af6dbaeb4310eab;hp=45f17c28686f8175f8fc2c6246e4f4599cc88a73;hpb=1e61b0aa05e2351e33d909f7503eaf936a2d9bb0;p=metaproxy-moved-to-github.git diff --git a/src/session.hpp b/src/session.hpp index 45f17c2..4c9094a 100644 --- a/src/session.hpp +++ b/src/session.hpp @@ -1,8 +1,20 @@ -/* $Id: session.hpp,v 1.13 2006-06-10 14:29:12 adam Exp $ - Copyright (c) 2005-2006, Index Data. +/* This file is part of Metaproxy. + Copyright (C) 2005-2009 Index Data - See the LICENSE file for details - */ +Metaproxy is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ #ifndef SESSION_HPP #define SESSION_HPP @@ -24,7 +36,7 @@ namespace metaproxy_1 { ++m_global_id; m_id = m_global_id; m_close = false; - }; + } /// copy session including old id Session(const Session &s) : m_id(s.m_id), m_close(s.m_close) {}; @@ -44,20 +56,21 @@ namespace metaproxy_1 { unsigned long id() const { return m_id; - }; + } bool is_closed() const { return m_close; - }; + } /// mark session closed, can not be unset void close() { m_close = true; - }; + } bool operator == (Session &ses) const { return ses.m_id == m_id; } + private: unsigned long int m_id; @@ -127,8 +140,9 @@ namespace metaproxy_1 { /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil - * c-file-style: "stroustrup" * End: * vim: shiftwidth=4 tabstop=8 expandtab */ +