logsui/logsserviceextension/inc/clogsextbrandfetcher.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 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 "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:  Fetches a brand icon and its bitmask.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_CLOGSEXTBRANDFETCHER_H
       
    21 #define C_CLOGSEXTBRANDFETCHER_H
       
    22 
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 class MLogsExtBrandFetcherObserver;
       
    27 
       
    28 /**
       
    29  * Branding icon fetcher class.
       
    30  *
       
    31  * @since S60 v3.2 
       
    32  */
       
    33 NONSHARABLE_CLASS(CLogsExtBrandFetcher) : public CBase
       
    34     {
       
    35     
       
    36 public:
       
    37     
       
    38         
       
    39     /**
       
    40      * Creates a new CLogsExtBrandFetcher.
       
    41      *
       
    42      * @since S60 v3.2
       
    43      * @param aServiceId a service id
       
    44      * @param aObserver the observer of this fetching process
       
    45      * @return a new CLogsExtBrandFetcher instance
       
    46      */       
       
    47     static CLogsExtBrandFetcher* NewL( 
       
    48         const TUint32 aServiceId, 
       
    49         MLogsExtBrandFetcherObserver& aObserver );
       
    50 
       
    51     /**
       
    52      * Creates a new CLogsExtBrandFetcher.
       
    53      *
       
    54      * @since S60 v3.2
       
    55      * @param aServiceId a service id
       
    56      * @param aObserver the observer of this fetching process
       
    57      * @return a new CLogsExtBrandFetcher instance
       
    58      */       
       
    59     static CLogsExtBrandFetcher* NewLC( 
       
    60         const TUint32 aServiceId, 
       
    61         MLogsExtBrandFetcherObserver& aObserver );
       
    62         
       
    63     /**
       
    64      * Destructor.
       
    65      */
       
    66     ~CLogsExtBrandFetcher();        
       
    67 
       
    68 public: 
       
    69     
       
    70     /**
       
    71      * Initiates the fetching of the icon.
       
    72      *
       
    73      * @since S60 v3.2
       
    74      * @return KErrNone in case of no error, system error otherwise
       
    75      * e.g. KErrNotReady if the fetcher is in use already
       
    76      */           
       
    77     TInt Fetch();
       
    78 
       
    79     /**
       
    80      * Returns the service id.
       
    81      *
       
    82      * @since S60 v3.2
       
    83      * @return the service id
       
    84      */ 
       
    85     TUint32 ServiceId();
       
    86 
       
    87     
       
    88 protected:
       
    89 
       
    90     /**
       
    91      * Symbian second-phase constructor
       
    92      */                    
       
    93     void ConstructL();
       
    94 
       
    95 
       
    96 private:
       
    97     
       
    98     /**
       
    99      * Constructor.
       
   100      */
       
   101     CLogsExtBrandFetcher( const TUint32 aServiceId, 
       
   102                           MLogsExtBrandFetcherObserver& aObserver );
       
   103         
       
   104     /**
       
   105      * Retrieves the icon's bitmap and bitmask from the branding server
       
   106      * and completes its own request. RunL should call the callback 
       
   107      * afterwards.
       
   108      *
       
   109      * @since S60 v3.2
       
   110      */ 
       
   111     void GetBitmapsFromBrandServerL();
       
   112         
       
   113         
       
   114 private: // data
       
   115         
       
   116     /**
       
   117      * Service id
       
   118      */
       
   119     TUint32 iServiceId;
       
   120         
       
   121     /**
       
   122      * The observer of this fetcher. Its callback function is called when
       
   123      * the bitmaps have been fetched successfully.
       
   124      * Not own.
       
   125      */
       
   126     MLogsExtBrandFetcherObserver* iObserver;
       
   127             
       
   128     };
       
   129 
       
   130 #endif // C_CLOGSEXTBRANDFETCHER_H