homescreensrv_plat/hs_content_control_api/inc/hscontentcontroller.h
changeset 0 79c6a41cd166
child 2 b7904b40483f
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 2008 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:  
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef HSCONTENTCOTROLLER_H
       
    19 #define HSCONTENTCOTROLLER_H
       
    20 
       
    21 // System includes
       
    22 #include <e32base.h>
       
    23 
       
    24 // Forward declarations
       
    25 class CHsContentInfo;
       
    26 class CHsContentInfoArray;
       
    27 
       
    28 // Constants
       
    29 
       
    30 /**
       
    31  * unable to add widget because active page is full.
       
    32  * No widgets can be added to this page before removing some first.
       
    33  */
       
    34 const TInt KHsErrorViewFull = -87001;
       
    35 
       
    36 /**
       
    37  * Unable to add this widget because the maximum instance count
       
    38  * per page will exceed
       
    39  */
       
    40 const TInt KHsErrorMaxInstanceCountExceeded = -87002; 
       
    41 
       
    42 /**
       
    43  * unable to add widget because widget is too large to fit.
       
    44  * A smaller widget might fit though.
       
    45  */
       
    46 const TInt KHsErrorDoesNotFit = -87003;
       
    47 
       
    48 
       
    49 
       
    50 /**
       
    51  *  Content controller interface
       
    52  *
       
    53  *
       
    54  *  @code
       
    55  *
       
    56  *  @endcode
       
    57  *
       
    58  *  @lib hscontentcontrol.lib
       
    59  *  @since S60 v5.0
       
    60  */
       
    61 class MHsContentController
       
    62     {
       
    63 public:
       
    64     /**
       
    65      * Fills an array of CHsContentInfo. Both widget and template types are appended.
       
    66      * @param aArray Array of CHsContentInfo
       
    67      */
       
    68     virtual TInt WidgetListL( CHsContentInfoArray& aArray ) = 0;
       
    69 
       
    70     /**
       
    71      * Fills an array of CHsContentInfo. View types are appended.
       
    72      * @param aArray Array of CHsContentInfo
       
    73      */
       
    74     virtual TInt ViewListL( CHsContentInfoArray& aArray ) = 0;
       
    75 
       
    76     /**
       
    77      *
       
    78      */
       
    79     virtual TInt AppListL( CHsContentInfoArray& aArray ) = 0;
       
    80 
       
    81     /**
       
    82      * Adds a widget to the active view.
       
    83      * @param aInfo Content info object
       
    84      * @return KErrNone on success, any of system wide error codes,
       
    85      *         KHsErrorViewFull, KHsErrorMaxInstanceCountExceeded or
       
    86      *         KHsErrorDoesNotFit
       
    87      */
       
    88     virtual TInt AddWidgetL( CHsContentInfo& aInfo ) = 0;
       
    89 
       
    90     /**
       
    91      * Removes a widget from the configuration.
       
    92      * @param aInfo Content info object
       
    93      */
       
    94     virtual TInt RemoveWidgetL( CHsContentInfo& aInfo ) = 0;
       
    95 
       
    96     /**
       
    97      *
       
    98      */
       
    99     virtual TInt AddViewL( CHsContentInfo& aInfo ) = 0;
       
   100 
       
   101     /**
       
   102      *
       
   103      */
       
   104     virtual TInt RemoveViewL( CHsContentInfo& aInfo ) = 0;
       
   105 
       
   106     /**
       
   107      *
       
   108      */
       
   109     virtual TInt ActivateViewL( CHsContentInfo& aInfo ) = 0;
       
   110 
       
   111     /**
       
   112      *
       
   113      */
       
   114     virtual TInt ActivateAppL( CHsContentInfo& aInfo ) = 0;
       
   115 
       
   116     };
       
   117 
       
   118 
       
   119 #endif // HSCONTENTCOTROLLER_H
       
   120 
       
   121 // End of file