sapi_sysinfo/inc/sysinfolists.h
changeset 0 14df0fbfcc4e
equal deleted inserted replaced
-1:000000000000 0:14df0fbfcc4e
       
     1 /*
       
     2 * Copyright (c) 2007-2007 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:  Implements CLiwIterable type
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __CSYSINFOLISTS_H
       
    20 #define __CSYSINFOLISTS_H
       
    21 
       
    22 #include <liwgenericparam.h> 
       
    23 
       
    24 class CAccList;
       
    25 class CAccessoryInfo;
       
    26 class CConnectionList;
       
    27 
       
    28 /**
       
    29  *  This class implements the abstract methods of CLiwIterable   
       
    30  *  class so that the user may iterate over the result 
       
    31  *  
       
    32  *  @since Series60 v3.2
       
    33  */
       
    34 NONSHARABLE_CLASS( CSysInfoAccList ) : public CLiwIterable
       
    35     {
       
    36     public:
       
    37 
       
    38     /**
       
    39     * Two-phased constructor.
       
    40     * @param aAccList holds a reference to the item list model
       
    41     * @return A pointer of type CSysInfoAccList
       
    42     */
       
    43     static CSysInfoAccList* NewL(const CAccList* aAccList );
       
    44 
       
    45     /**
       
    46     * Destructor.
       
    47     */
       
    48     ~CSysInfoAccList();
       
    49 
       
    50     /**
       
    51     * Resets the iterator to point to the beginning of list
       
    52     * @param void
       
    53     * @return void
       
    54     */
       
    55     void Reset();	
       
    56 
       
    57     /**
       
    58     * Constructs the next accessory item in the form of a map
       
    59     * @param TLiwVariant an output parameter that contains the result
       
    60     * @return TBool On success this returns ETrue else returns EFalse
       
    61     */	
       
    62     TBool NextL( TLiwVariant& aItem );
       
    63 
       
    64     private:
       
    65     /**
       
    66     * Parameterised constructor
       
    67     * @since  Series60 v3.2
       
    68     * @param  aItemListModel holds a reference to the item list model
       
    69     * @param  aCmdId specifies whether the SAPI is GetFiles or GetFilesInfo
       
    70     */
       
    71 
       
    72     CSysInfoAccList(const CAccList* aAccList );
       
    73 
       
    74     private: // data
       
    75 
       
    76     /**
       
    77     * A pointer to MCLFItemListModel class
       
    78     */
       
    79     const CAccList* iAccList;
       
    80 
       
    81     /**
       
    82     * Gives the total number of items in list model 
       
    83     */
       
    84     TInt iCount;
       
    85     /**
       
    86     * Gives the current item being processed
       
    87     */
       
    88     TInt iCurrent;
       
    89     };
       
    90 
       
    91 /**
       
    92  *  This class implements the abstract methods of CLiwIterable   
       
    93  *  class so that the user may iterate over the result 
       
    94  *  
       
    95  *  @since Series60 v3.2
       
    96  */
       
    97 NONSHARABLE_CLASS( CSysInfoConnList ) : public CLiwIterable
       
    98     {
       
    99     public:
       
   100 
       
   101     /**
       
   102     * Two-phased constructor.
       
   103     * @param aItemListModel holds a reference to the item list model
       
   104     * @param aCmdId specifies whether the SAPI is GetFiles or GetFilesInfo
       
   105     * @return A pointer of type CSysInfoAccList
       
   106     */
       
   107     static CSysInfoConnList* NewL(const CConnectionList* aConnList );
       
   108 
       
   109     /**
       
   110     * Destructor.
       
   111     */
       
   112     ~CSysInfoConnList();
       
   113 
       
   114     /**
       
   115     * Resets the iterator to point to the beginning of list
       
   116     * @param void
       
   117     * @return void
       
   118     */
       
   119     void Reset();	
       
   120 
       
   121     /**
       
   122     * Constructs the next media item in the form of a map
       
   123     * @param TLiwVariant an output parameter that contains the result
       
   124     * @return TBool On success this returns ETrue else returns EFalse
       
   125     */	
       
   126     TBool NextL( TLiwVariant& aItem );
       
   127 
       
   128     private:
       
   129 
       
   130     /**
       
   131     * Parameterised constructor
       
   132     * @since  Series60 v3.2
       
   133     * @param  aConnList holds a reference to the item list model
       
   134     */
       
   135 
       
   136     CSysInfoConnList(const CConnectionList* aConnList );
       
   137 
       
   138     private: // data
       
   139 
       
   140     /**
       
   141     * A pointer to MCLFItemListModel class
       
   142     */
       
   143     const CConnectionList* iConnList;
       
   144 
       
   145     /**
       
   146     * Gives the total number of items in list model 
       
   147     */
       
   148     TInt iCount;
       
   149     /**
       
   150     * Gives the current item being processed
       
   151     */
       
   152     TInt iCurrent;
       
   153     };
       
   154 
       
   155 #endif // __CSYSINFOLISTS_H