PECengine/AttributeLibrary2/Src/CPEngSessionSlotObjectCon.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  NWSessionSlot object container.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CPENGSESSIONSLOTOBJECTCON_H
       
    19 #define CPENGSESSIONSLOTOBJECTCON_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include <E32Base.h>
       
    23 
       
    24 
       
    25 
       
    26 //FORWARD DECLARATION
       
    27 class CPEngSessionSlotObject;
       
    28 class CPEngSessionSlotId;
       
    29 
       
    30 
       
    31 
       
    32 // CLASS DECLARATION
       
    33 /**
       
    34  * Object container for session slot,
       
    35  * reference counted objects.
       
    36  *
       
    37  * @since 3.0
       
    38  */
       
    39 NONSHARABLE_CLASS( CPEngSessionSlotObjectCon ) : public CBase
       
    40     {
       
    41 public: /* Construction */
       
    42 
       
    43 
       
    44     /**
       
    45      * Instantiates CPEngSessionSlotObjectCon object.
       
    46      *
       
    47      * @return New CPEngSessionSlotObjectCon instance.
       
    48      */
       
    49     static CPEngSessionSlotObjectCon* NewL();
       
    50 
       
    51 
       
    52     /**
       
    53      * Destructor.
       
    54      */
       
    55     ~CPEngSessionSlotObjectCon();
       
    56 
       
    57 
       
    58 private:
       
    59 
       
    60     /**
       
    61      * C++ constructor.
       
    62      */
       
    63     CPEngSessionSlotObjectCon();
       
    64 
       
    65 
       
    66 
       
    67 public: // Object management
       
    68 
       
    69     /**
       
    70      * Locates session slot object by session slot id.
       
    71      *
       
    72      * @param aSlotId The slot id for which to locate object.
       
    73      * @return Located session slot object or NULL.
       
    74      */
       
    75     CPEngSessionSlotObject* FindById( const CPEngSessionSlotId& aSlotId );
       
    76     const CPEngSessionSlotObject* FindById( const CPEngSessionSlotId& aSlotId ) const;
       
    77 
       
    78 
       
    79     /**
       
    80      * Adds a new session slot object to container.
       
    81      *
       
    82      * @param aObject The object to add. Object may not be NULL,
       
    83      * and it may not be previously added to any other container.
       
    84      */
       
    85     void AddL( CPEngSessionSlotObject* aObject );
       
    86 
       
    87 
       
    88     /**
       
    89      * Removes a session slot object from container.
       
    90      *
       
    91      * @param aObject The object to remove.
       
    92      * Object may not be NULL.
       
    93      */
       
    94     void Remove( CPEngSessionSlotObject* aObject );
       
    95 
       
    96 
       
    97     /**
       
    98      * Gets the count of hold session slot objects.
       
    99      *
       
   100      * @return The count of hold session slot objects.
       
   101      */
       
   102     TInt Count() const;
       
   103 
       
   104 
       
   105     /**
       
   106      * Gets a reference to session slot object.
       
   107      *
       
   108      * @param aIndex The index of object to get.
       
   109      * @return The session slot object.
       
   110      */
       
   111     CPEngSessionSlotObject& At( TInt aIndex );
       
   112 
       
   113 
       
   114 private: // Object management
       
   115 
       
   116     CPEngSessionSlotObject* DoFindById( const CPEngSessionSlotId& aSlotId );
       
   117 
       
   118 
       
   119 
       
   120 private:    // Data
       
   121 
       
   122     //OWN: The session slot objects
       
   123     RPointerArray< CPEngSessionSlotObject > iObjects;
       
   124 
       
   125     };
       
   126 
       
   127 
       
   128 
       
   129 #endif      // CPENGSESSIONSLOTOBJECTCON_H
       
   130 
       
   131 // End of File