wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/genscanlistiterator.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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 the License "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:  Declaration of the ScanListIterator class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef GENSCANLISTITERATOR_H
       
    20 #define GENSCANLISTITERATOR_H
       
    21 
       
    22 #include "genscanlist.h"
       
    23 
       
    24 class ScanList;
       
    25 
       
    26 /**
       
    27 *  Iterator for TScanList.
       
    28 */
       
    29 NONSHARABLE_CLASS( ScanListIterator )
       
    30     {
       
    31 public:
       
    32 
       
    33     /**
       
    34      * Return the size of the scan info. The size includes the static
       
    35      * control information header and the actual frame data.
       
    36      *
       
    37      * @return The size of the scan info in bytes.
       
    38      */
       
    39     inline u16_t Size() const;
       
    40 
       
    41     /**
       
    42      * Return the first beacon/probe response frame.
       
    43      *
       
    44      * @return NULL if the container is empty, pointer to the first
       
    45      *          frame in the container otherwise.
       
    46      */
       
    47     const ScanFrame* First();
       
    48 
       
    49     /**
       
    50      * Return the next beacon/probe response frame.
       
    51      *
       
    52      * @return NULL if the container is empty or end of the container
       
    53      *         has been reached, pointer to the next frame otherwise.
       
    54      */
       
    55     const ScanFrame* Next();
       
    56 
       
    57     /**
       
    58      * Return the beacon/probe response frame currently iterated.
       
    59      *
       
    60      * @return NULL if no frame has been iterated to, pointer to the
       
    61      *         frame otherwise.
       
    62      */
       
    63     const ScanFrame* Current() const;
       
    64 
       
    65     /**
       
    66      * Check whether the are more beacon/probe response frames to be iterated.
       
    67      *
       
    68      * @return false_t if end of the container has been reached, true_t otherwise.
       
    69      */
       
    70     bool_t IsDone() const;
       
    71     
       
    72 protected: // Methods
       
    73 
       
    74     /**
       
    75      * Private C++ constructor to prevent instantiation.
       
    76      *
       
    77      * @param scan_list Reference to the scan list container.
       
    78      */
       
    79     explicit ScanListIterator( const ScanList& scan_list );
       
    80 
       
    81 private: // Methods
       
    82 
       
    83     /**
       
    84      * Prohibit copy constructor.
       
    85      */
       
    86     ScanListIterator(
       
    87         const ScanListIterator& );
       
    88     /**
       
    89      * Prohibit assigment operator.
       
    90      */
       
    91     ScanListIterator& operator= (
       
    92         const ScanListIterator& );
       
    93 
       
    94 protected: // Data
       
    95 
       
    96     /** Pointer to the beginning of the current frame. */
       
    97     const ScanFrame* current_m;
       
    98 
       
    99 private:  // Data
       
   100     /** Reference to the scan list container. */
       
   101     const ScanList& scan_list_m;
       
   102     };
       
   103 
       
   104 #include "genscanlistiterator.inl"
       
   105 
       
   106 #endif      // GENSCANLISTITERATOR_H