idlehomescreen/examples/carouselwidgetexample/publisher/inc/carouselplugin.h
author jake
Mon, 02 Aug 2010 12:02:47 +0300
branchRCL_3
changeset 29 d12a7ea0f775
permissions -rw-r--r--
Example applications for various Homescreen APIs.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
29
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
     1
/*
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
     2
* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
     3
* All rights reserved.
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
     4
* This component and the accompanying materials are made available
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
     6
* which accompanies this distribution, and is available
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
     8
*
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
     9
* Initial Contributors:
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    11
*
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    12
* Contributors:
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    13
*
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    14
* Description:  Plug-in main class
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    15
*
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    16
*/
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    17
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    18
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    19
#ifndef CMCSPLUGIN_H
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    20
#define CMCSPLUGIN_H
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    21
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    22
// System includes
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    23
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    24
// User includes
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    25
#include <hscontentpublisher.h>
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    26
#include <aicontentmodel.h>
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    27
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    28
// Forward declarations
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    29
class MAiContentObserver;
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    30
class MAiContentItemIterator;
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    31
class CCarouselPluginEngine;
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    32
class CCarouselData;
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    33
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    34
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    35
/**
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    36
 * @ingroup group_mcsplugin
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    37
 *
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    38
 * MCS Plug-in main class
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    39
 *
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    40
 * @since S60 5.2
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    41
 */
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    42
NONSHARABLE_CLASS( CCarouselPlugin ) : public CHsContentPublisher    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    43
    {
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    44
public:
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    45
    // constructor and destructor
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    46
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    47
    static CCarouselPlugin* NewL();
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    48
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    49
    ~CCarouselPlugin();
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    50
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    51
private:
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    52
    // constructors
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    53
    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    54
    /**
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    55
    * C++ default constructor
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    56
    */
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    57
    CCarouselPlugin();
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    58
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    59
    /**
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    60
    * 2nd phase constructor
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    61
    */
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    62
    void ConstructL();
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    63
    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    64
public:
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    65
    // from CHsContentPublisher
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    66
  
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    67
    /**
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    68
     * @see CHsContentPublisher
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    69
     */
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    70
    void Start( TStartReason aReason );
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    71
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    72
    /**
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    73
     * @see CHsContentPublisher
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    74
     */
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    75
    void Stop( TStopReason aReason );
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    76
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    77
    /**
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    78
     * @see CHsContentPublisher
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    79
     */    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    80
    void Resume( TResumeReason aReason );
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    81
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    82
    /**
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    83
     * @see CHsContentPublisher
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    84
     */    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    85
    void Suspend( TSuspendReason aReason );
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    86
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    87
    /**
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    88
     * @see CHsContentPublisher
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    89
     */    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    90
    void SubscribeL( MAiContentObserver& aObserver );
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    91
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    92
    /**
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    93
     * @see CHsContentPublisher
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    94
     */    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    95
    void ConfigureL( RAiSettingsItemArray& aSettings );
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    96
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    97
    /**
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    98
     * @see CHsContentPublisher
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
    99
     */    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   100
    TAny* GetProperty( TProperty aProperty );
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   101
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   102
    /**
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   103
     * @see CHsContentPublisher
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   104
     */   
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   105
    void HandleEvent( const TDesC& aEventName, const TDesC& aParam );
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   106
    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   107
public:
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   108
    // new functions
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   109
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   110
    /**
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   111
    * Publishes data
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   112
    */
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   113
    void PublishL();
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   114
    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   115
private:
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   116
    // new functions
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   117
    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   118
    /**
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   119
     * CompareItems
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   120
     */
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   121
    static TInt CompareItems( const MAiPluginSettings& aFirst,
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   122
        const MAiPluginSettings& aSecond );
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   123
          
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   124
    /**
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   125
     * Publishes content for one menu item
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   126
     */
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   127
    void PublishLItemL( MAiContentObserver& aObserver, CCarouselData& aDataItem, TInt aIndex );
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   128
    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   129
    void PublishEditorItemsL();
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   130
        
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   131
    /**
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   132
    * Delete content model
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   133
    */  
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   134
    void DeleteContentModel();    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   135
    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   136
    /**
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   137
     * Determines if dirty items exists
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   138
     */
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   139
    TBool PublishRequired() const; 
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   140
    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   141
private: 
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   142
    // data
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   143
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   144
    /** Iterator for plugin content, owned */    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   145
    MAiContentItemIterator* iContent;
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   146
    /** Number of data in the content model */
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   147
    TInt iDataCount;
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   148
    /** Dynamic content model, owned */    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   149
    TAiContentItem* iContentModel;
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   150
    /** Plugin engine, owned */    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   151
    CCarouselPluginEngine* iEngine;
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   152
    /** Array of content observers, not owned */    
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   153
    RPointerArray<MAiContentObserver> iObservers;
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   154
    };
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   155
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   156
#endif // CMCSPLUGIN_H
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   157
d12a7ea0f775 Example applications for various Homescreen APIs.
jake
parents:
diff changeset
   158
// End of file