homescreenplugins/videochplugin/inc/videonotificationlauncher.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2008-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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_VCXNSNOTIFICATIONLAUNCHER_H
       
    21 #define C_VCXNSNOTIFICATIONLAUNCHER_H
       
    22 
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include <MediatorEventConsumer.h>
       
    26 
       
    27 class CVcxNsChMCategoryListener;
       
    28 class CVcxNsChPublishableData;
       
    29 class CVcxNsChPublisher;
       
    30 
       
    31 /**
       
    32  *  CVcxNsNotificationLauncher
       
    33  * 
       
    34  *  @lib vcxnscontentharvesterplugin.dll
       
    35  *  @since S60 5.0
       
    36  */
       
    37 class CVcxNsNotificationLauncher : public CBase,
       
    38                                    public MMediatorEventObserver
       
    39     {
       
    40 
       
    41 public:
       
    42 
       
    43     static CVcxNsNotificationLauncher* NewL( CVcxNsChPublishableData* aPublishableData,
       
    44                                              CVcxNsChPublisher* aPublisher );
       
    45 
       
    46     virtual ~CVcxNsNotificationLauncher();
       
    47     
       
    48     /**
       
    49      * From MMediatorEventObserver
       
    50      * 
       
    51      * Catches the events
       
    52      */
       
    53     void MediatorEventL( TUid aDomain,
       
    54                          TUid aCategory, 
       
    55                          TInt aEventId, 
       
    56                          const TDesC8& aData );
       
    57 
       
    58 private:
       
    59 
       
    60     CVcxNsNotificationLauncher( CVcxNsChPublishableData* aPublishableData,
       
    61                                 CVcxNsChPublisher* aPublisher );
       
    62 
       
    63     void ConstructL();
       
    64         
       
    65 
       
    66 public:
       
    67     
       
    68     /**
       
    69      * Launch download completed notification.
       
    70 	 *
       
    71 	 * @param aMedia Downloaded video.
       
    72      */
       
    73     void DlCompletedNotificationL( const CMPXMedia& aMedia );
       
    74     
       
    75     /**
       
    76      * Launches soft notification.         
       
    77      */
       
    78     void LaunchExitingNotificationL();
       
    79                             
       
    80 private: // New functions
       
    81     
       
    82     /**
       
    83     * Loads a resource stringL.
       
    84     * 
       
    85     * @param  Resource id.
       
    86     * @return the string. ownership transferred to caller.
       
    87     */
       
    88     HBufC* LoadResourceStringL( TInt aResourceId );
       
    89 
       
    90 // Data members
       
    91     
       
    92     /**
       
    93     * Mediator helper object
       
    94     */
       
    95     CVcxNsChMCategoryListener* iCatListener;
       
    96     
       
    97     /**
       
    98     * pointer to plugin data, not owned
       
    99     */
       
   100     CVcxNsChPublishableData* iPublishableData;
       
   101  
       
   102     /**
       
   103      * Publisher object used to publish data from CVcxNsChPublishableData
       
   104      * to service api 
       
   105      * NOT OWN
       
   106      */
       
   107     CVcxNsChPublisher* iPublisher;
       
   108 
       
   109     /**
       
   110     * Localized string for popup
       
   111     */
       
   112     HBufC* iDownloadCompletedBuffer;
       
   113     
       
   114     /**
       
   115     * Localized string for popup
       
   116     */
       
   117     HBufC* iDownloadsContinueBuffer;
       
   118     
       
   119     };
       
   120 
       
   121 #endif // C_VCXNSNOTIFICATIONLAUNCHER_H