utilities/serviceipcserver/sessionidtable.h
changeset 16 3c88a81ff781
equal deleted inserted replaced
14:6aeb7a756187 16:3c88a81ff781
       
     1 /**
       
     2    This file is part of CWRT package **
       
     3 
       
     4    Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). **
       
     5 
       
     6    This program is free software: you can redistribute it and/or modify
       
     7    it under the terms of the GNU (Lesser) General Public License as
       
     8    published by the Free Software Foundation, version 2.1 of the License.
       
     9    This program is distributed in the hope that it will be useful, but
       
    10    WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
       
    12    (Lesser) General Public License for more details. You should have
       
    13    received a copy of the GNU (Lesser) General Public License along
       
    14    with this program. If not, see <http://www.gnu.org/licenses/>.
       
    15 */
       
    16 
       
    17 
       
    18 #ifndef SESSIONIDTABLE_H
       
    19 #define SESSIONIDTABLE_H
       
    20 
       
    21 namespace WRT
       
    22 {
       
    23 // CONSTANTS
       
    24 
       
    25 const int SessionIdTableSize = 65536;
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /*!
       
    30 * Class for acquiring session Ids.
       
    31 *
       
    32 */
       
    33 class SessionIdTable
       
    34 {
       
    35 
       
    36     public:
       
    37 
       
    38         SessionIdTable();
       
    39         
       
    40         int allocate();
       
    41 
       
    42         void release( int aSessionId );
       
    43 
       
    44     private: // Data
       
    45 
       
    46         bool m_data[SessionIdTableSize];
       
    47 
       
    48 };
       
    49 }
       
    50 #endif // SESSIONIDTABLE_H
       
    51 // End of file