wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_scan_list_iterator.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2005-2009 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:  Class for different iterators for the scan list
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CORE_SCAN_LIST_ITERATOR_H
       
    20 #define CORE_SCAN_LIST_ITERATOR_H
       
    21 
       
    22 #include "abs_core_scan_list_iterator.h"
       
    23 #include "core_ap_data.h"
       
    24 
       
    25 class core_scan_list_c;
       
    26 
       
    27 /**
       
    28  * This class iterates the scan list by not tagged items.
       
    29  */
       
    30 NONSHARABLE_CLASS( core_scan_list_iterator_by_tag_c ) : public abs_core_scan_list_iterator_c
       
    31     {
       
    32 
       
    33 public:
       
    34 
       
    35     /**
       
    36      * Constructor
       
    37      *
       
    38      * @since S60 v3.1
       
    39      * @param scan_list Reference to the scan list instance.
       
    40      * @param tag The suitable entiries must not contain this tag.
       
    41      */
       
    42     core_scan_list_iterator_by_tag_c(
       
    43         core_scan_list_c& scan_list,
       
    44         u8_t tag );
       
    45 
       
    46     /**
       
    47      * Destructor.
       
    48      */
       
    49     virtual ~core_scan_list_iterator_by_tag_c();
       
    50 
       
    51     /**
       
    52      * Return the first entry in the list that matches the iterator type.
       
    53      *
       
    54      * @since S60 v3.1
       
    55      * @return NULL if the list empty, pointer to the first entry otherwise.
       
    56      * @note This method will reset the internal iterator.
       
    57      */
       
    58     virtual core_ap_data_c* first();
       
    59 
       
    60     /**
       
    61      * Return the next entry in the list.
       
    62      *
       
    63      * @since S60 v3.1
       
    64      * @return NULL if the current entry is the last one,
       
    65      *         pointer to the next entry otherwise.
       
    66      */
       
    67     virtual core_ap_data_c* next();
       
    68 
       
    69     /**
       
    70      * Return the current entry in the list.
       
    71      *
       
    72      * @since S60 v3.1
       
    73      * @return pointer to the current entry.
       
    74      */
       
    75     virtual core_ap_data_c* current();
       
    76 
       
    77 private: // data
       
    78 
       
    79     /**
       
    80      * Handle to the scan list instance.
       
    81      */
       
    82     core_scan_list_c& scan_list_m;
       
    83 
       
    84     /**
       
    85      * The suitable entries must not contain this tag.
       
    86      */
       
    87     u8_t tag_m;
       
    88 
       
    89     };
       
    90 
       
    91 /**
       
    92  * This class iterates the scan list by age.
       
    93  */
       
    94 NONSHARABLE_CLASS( core_scan_list_iterator_by_age_c ) : public abs_core_scan_list_iterator_c
       
    95     {
       
    96 
       
    97 public:
       
    98 
       
    99     /**
       
   100      * Constructor
       
   101      *
       
   102      * @since S60 v3.1
       
   103      * @param scan_list Reference to the scan list instance.
       
   104      * @param maximum_age The maximum age of suitable entries in seconds.
       
   105      */
       
   106     core_scan_list_iterator_by_age_c(
       
   107         core_scan_list_c& scan_list,
       
   108         u32_t maximum_age );
       
   109 
       
   110     /**
       
   111      * Destructor.
       
   112      */
       
   113     virtual ~core_scan_list_iterator_by_age_c();
       
   114 
       
   115     /**
       
   116      * Return the first entry in the list that matches the iterator type.
       
   117      *
       
   118      * @since S60 v3.1
       
   119      * @return NULL if the list empty, pointer to the first entry otherwise.
       
   120      * @note This method will reset the internal iterator.
       
   121      */
       
   122     virtual core_ap_data_c* first();
       
   123 
       
   124     /**
       
   125      * Return the next entry in the list.
       
   126      *
       
   127      * @since S60 v3.1
       
   128      * @return NULL if the current entry is the last one,
       
   129      *         pointer to the next entry otherwise.
       
   130      */
       
   131     virtual core_ap_data_c* next();
       
   132 
       
   133     /**
       
   134      * Return the current entry in the list.
       
   135      *
       
   136      * @since S60 v3.1
       
   137      * @return pointer to the current entry.
       
   138      */
       
   139     virtual core_ap_data_c* current();
       
   140 
       
   141 private: // data
       
   142 
       
   143     /**
       
   144      * Handle to the scan list instance.
       
   145      */
       
   146     core_scan_list_c& scan_list_m;
       
   147 
       
   148     /**
       
   149      * The maximum age of suitable entries in seconds.
       
   150      */
       
   151     u32_t maximum_age_m;
       
   152 
       
   153     };
       
   154 
       
   155 /**
       
   156  * This class iterates the scan list by not tagged items and matching SSID.
       
   157  */
       
   158 NONSHARABLE_CLASS( core_scan_list_iterator_by_tag_and_ssid_c ) : public core_scan_list_iterator_by_tag_c
       
   159     {
       
   160 
       
   161 public:
       
   162 
       
   163     /**
       
   164      * Constructor
       
   165      *
       
   166      * @since S60 v3.1
       
   167      * @param scan_list Reference to the scan list instance.
       
   168      * @param tag The suitable entiries must not contain this tag.
       
   169      * @param ssid SSID to match against entries.
       
   170      */
       
   171     core_scan_list_iterator_by_tag_and_ssid_c(
       
   172         core_scan_list_c& scan_list,
       
   173         u8_t tag,
       
   174         const core_ssid_s& ssid );
       
   175 
       
   176     /**
       
   177      * Destructor.
       
   178      */
       
   179     virtual ~core_scan_list_iterator_by_tag_and_ssid_c();
       
   180 
       
   181     /**
       
   182      * Return the first entry in the list that matches the iterator type.
       
   183      *
       
   184      * @since S60 v3.1
       
   185      * @return NULL if the list empty, pointer to the first entry otherwise.
       
   186      * @note This method will reset the internal iterator.
       
   187      */
       
   188     virtual core_ap_data_c* first();
       
   189 
       
   190     /**
       
   191      * Return the next entry in the list.
       
   192      *
       
   193      * @since S60 v3.1
       
   194      * @return NULL if the current entry is the last one,
       
   195      *         pointer to the next entry otherwise.
       
   196      */
       
   197     virtual core_ap_data_c* next();
       
   198 
       
   199 private: // data
       
   200 
       
   201     /**
       
   202      * SSID to match against entries.
       
   203      */
       
   204     core_ssid_s ssid_m;
       
   205 
       
   206     };
       
   207 
       
   208 /**
       
   209  * This class iterates the scan list by not tagged items and matching SSID
       
   210  * and BSSID.
       
   211  */
       
   212 NONSHARABLE_CLASS( core_scan_list_iterator_by_tag_and_ssid_and_bssid_c ) : public core_scan_list_iterator_by_tag_and_ssid_c
       
   213     {
       
   214 
       
   215 public:
       
   216 
       
   217     /**
       
   218      * Constructor
       
   219      *
       
   220      * @since S60 v3.1
       
   221      * @param scan_list Reference to the scan list instance.
       
   222      * @param tag The suitable entiries must not contain this tag.
       
   223      * @param ssid SSID to match against entries.
       
   224      * @param bssid BSSID to match against entries.
       
   225      */
       
   226     core_scan_list_iterator_by_tag_and_ssid_and_bssid_c(
       
   227         core_scan_list_c& scan_list,
       
   228         u8_t tag,
       
   229         const core_ssid_s& ssid,
       
   230         const core_mac_address_s& bssid );
       
   231 
       
   232     /**
       
   233      * Destructor.
       
   234      */
       
   235     virtual ~core_scan_list_iterator_by_tag_and_ssid_and_bssid_c();
       
   236 
       
   237     /**
       
   238      * Return the first entry in the list that matches the iterator type.
       
   239      *
       
   240      * @since S60 v3.1
       
   241      * @return NULL if the list empty, pointer to the first entry otherwise.
       
   242      * @note This method will reset the internal iterator.
       
   243      */
       
   244     virtual core_ap_data_c* first();
       
   245 
       
   246     /**
       
   247      * Return the next entry in the list.
       
   248      *
       
   249      * @since S60 v3.1
       
   250      * @return NULL if the current entry is the last one,
       
   251      *         pointer to the next entry otherwise.
       
   252      */
       
   253     virtual core_ap_data_c* next();
       
   254 
       
   255 private: // data
       
   256 
       
   257     /**
       
   258      * BSSID to match against entries.
       
   259      */
       
   260     core_mac_address_s bssid_m;
       
   261 
       
   262     };
       
   263 
       
   264 #endif // CORE_SCAN_LIST_ITERATOR_H