homescreensrv_plat/ai_plugin_management_api/inc/aiscutcontentmodel.h
branchRCL_3
changeset 8 d0529222e3f0
parent 4 1a2a00e78665
child 11 bd874ee5e5e2
equal deleted inserted replaced
4:1a2a00e78665 8:d0529222e3f0
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  Content model for shortcut plug-in.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef AISCUTCONTENTMODEL_H
       
    20 #define AISCUTCONTENTMODEL_H
       
    21 
       
    22 #include <aicontentmodel.h>
       
    23 
       
    24 #include <platform/mw/aiscutuids.hrh>
       
    25 
       
    26 // AI Shortcut Plug-in ECOM implementation UID.
       
    27 const TInt KImplUidScutPlugin = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SCUTPLUGIN;
       
    28 const TUid KUidScutPlugin = { KImplUidScutPlugin };
       
    29 
       
    30 // ================================= CONTENT ===================================
       
    31 
       
    32 /**
       
    33  * Content Ids.
       
    34  */
       
    35 enum TAiScutContentIds
       
    36 {
       
    37     EAiScutContentShortcutIcon,
       
    38     EAiScutContentShortcutCaption,
       
    39     EAiScutContentShortcutShortCaption,
       
    40     EAiScutContentShortcutMskCaption,
       
    41     EAiScutContentShortcutSkCaption,
       
    42     EAiScutContentShortcutSkIcon,
       
    43     EAiScutContentShortcutToolbarCaption,
       
    44     EAiScutContentShortcutToolbarIcon,
       
    45     EAiScutContentPopupTextCaptionLine,
       
    46     EAiScutContentPopupTextFirstLine,
       
    47     EAiScutContentPopupTextSecondLine,
       
    48     EAiScutContentPopupTextThirdLine
       
    49 };
       
    50 
       
    51 /**
       
    52  * Content that the plug-in will publish.
       
    53  */
       
    54 const TAiContentItem KAiScutContent[] =
       
    55 {
       
    56     // Shortcut icon as CFbsBitmap.
       
    57     { EAiScutContentShortcutIcon,         L"ShortcutIcon",         KAiContentTypeBitmap }
       
    58     ,
       
    59     // Shortcut caption as plain text (used for long application titles).
       
    60     { EAiScutContentShortcutCaption,      L"ShortcutCaption",      "text/plain" }
       
    61     ,
       
    62     // Shortcut short caption as plain text (used for short application titles in softkeys).
       
    63     { EAiScutContentShortcutShortCaption, L"ShortcutShortCaption", "text/plain" }
       
    64     ,
       
    65     // Shortcut msk caption as plain text (used for short application titles in MSK).
       
    66     { EAiScutContentShortcutMskCaption,   L"ShortcutMskCaption",   "text/plain" }
       
    67        ,
       
    68     // Shortcut sk caption as plain text (used for short application titles in SK).
       
    69     { EAiScutContentShortcutSkCaption,   L"ShortcutSkCaption",   "text/plain" }
       
    70    ,
       
    71     // Shortcut sk icon as bitmap (used for application icons in SK).
       
    72     { EAiScutContentShortcutSkIcon,   L"ShortcutSkIcon",   KAiContentTypeBitmap }
       
    73    ,
       
    74     // Shortcut sk caption as plain text (used for short application titles in SK).
       
    75     { EAiScutContentShortcutToolbarCaption,   L"ShortcutToolbarCaption",   "text/plain" }
       
    76    ,
       
    77      // Shortcut toolbar icon as bitmap (used for application icons in toolbar).
       
    78     { EAiScutContentShortcutToolbarIcon,   L"ShortcutToolbarIcon",   KAiContentTypeBitmap }
       
    79     ,
       
    80     // Caption line of Popup as plain text.
       
    81     { EAiScutContentPopupTextCaptionLine,  L"ShortcutPopupCaptionLine", "text/plain" }
       
    82     ,
       
    83     // 1st actual line of Popup as plain text.
       
    84     { EAiScutContentPopupTextFirstLine,  L"ShortcutPopup1stLine", "text/plain" }
       
    85     ,
       
    86     // 2nd actual line of Popupn as plain text.
       
    87     { EAiScutContentPopupTextSecondLine, L"ShortcutPopup2ndLine", "text/plain" }
       
    88     ,
       
    89     // 3rd actual line of Popup as plain text.
       
    90     { EAiScutContentPopupTextThirdLine,  L"ShortcutPopup3rdLine", "text/plain" }
       
    91 };
       
    92 
       
    93 const TInt KAiScutContentCount = sizeof( KAiScutContent ) / 
       
    94                                             sizeof( KAiScutContent[0] );
       
    95 
       
    96 
       
    97 // ================================ RESOURCES ==================================
       
    98 
       
    99 /**
       
   100  * Resource Ids.
       
   101  */
       
   102 enum TAiScutPluginResourceIds
       
   103 {
       
   104     EAiScutResourceDefaultIcon,
       
   105     EAiScutResourceEmptyIcon,
       
   106     EAiScutResourceBackCaption,
       
   107     EAiScutResourceEmptyCaption,
       
   108     EAiScutResourceNewMsgCaption,
       
   109     EAiScutResourceNewEmailCaption,
       
   110     EAiScutResourceNewSyncMLMailCaption,
       
   111     EAiScutResourceNewPostcardCaption,
       
   112     EAiScutResourceNewAudioMsgCaption,
       
   113     EAiScutResourceSelectMsgTypeCaption,
       
   114     EAiScutResourceChangeThemeCaption,
       
   115     EAiScutResourceNewMsgShortCaption,
       
   116     EAiScutResourceNewEmailShortCaption,
       
   117     EAiScutResourceNewSyncMLMailShortCaption,
       
   118     EAiScutResourceNewPostcardShortCaption,
       
   119     EAiScutResourceNewAudioMsgShortCaption,
       
   120     EAiScutResourceSelectMsgTypeShortCaption,
       
   121     EAiScutResourceChangeThemeShortCaption
       
   122 };
       
   123 
       
   124 /**
       
   125  * Resources that the plug-in will publish.
       
   126  */
       
   127 const TAiContentItem KAiScutResources[] =
       
   128 {
       
   129     // Default shortcut icon.
       
   130     { EAiScutResourceDefaultIcon,            L"DefaultIcon",            "image/*" }
       
   131     ,
       
   132     // Empty shortcut icon, used when shortcut target is unknown.
       
   133     { EAiScutResourceEmptyIcon,              L"EmptyIcon",              "image/*" }
       
   134     ,
       
   135     // Localizable caption for the back shortcut
       
   136     { EAiScutResourceBackCaption,            L"BackCaption",            "text/plain" }
       
   137     ,
       
   138     // Localizable caption for the empty shortcut.
       
   139     { EAiScutResourceEmptyCaption,           L"EmptyCaption",           "text/plain" }
       
   140     ,
       
   141     // Localizable caption for the "new message" shortcut.
       
   142     { EAiScutResourceNewMsgCaption,          L"NewMessageCaption",      "text/plain" }
       
   143     ,
       
   144     // Localizable caption for the "new email" shortcut.
       
   145     { EAiScutResourceNewEmailCaption,        L"NewEmailCaption",        "text/plain" }
       
   146     ,
       
   147     // Localizable caption for the "new syncml mail" shortcut.
       
   148     { EAiScutResourceNewSyncMLMailCaption,   L"NewSyncMLMailCaption",   "text/plain" }
       
   149     ,
       
   150     // Localizable caption for the "new postcard" shortcut.
       
   151     { EAiScutResourceNewPostcardCaption,     L"NewPostcardCaption",     "text/plain" }
       
   152     ,
       
   153     // Localizable caption for the "new audio message" shortcut.
       
   154     { EAiScutResourceNewAudioMsgCaption,     L"NewAudioMsgCaption",     "text/plain" }
       
   155     ,
       
   156     // Localizable caption for the "select message type" shortcut.
       
   157     { EAiScutResourceSelectMsgTypeCaption,   L"SelectMsgTypeCaption",   "text/plain" }
       
   158     ,
       
   159     // Localizable caption for the "change theme" shortcut.
       
   160     { EAiScutResourceChangeThemeCaption,     L"ChangeThemeCaption",     "text/plain" }
       
   161     ,
       
   162     // Localizable short caption for the "new message" shortcut.
       
   163     { EAiScutResourceNewMsgShortCaption,          L"NewMessageShortCaption",      "text/plain" }
       
   164     ,
       
   165     // Localizable short caption for the "new email" shortcut.
       
   166     { EAiScutResourceNewEmailShortCaption,        L"NewEmailShortCaption",        "text/plain" }
       
   167     ,
       
   168     // Localizable short caption for the "new syncml mail" shortcut.
       
   169     { EAiScutResourceNewSyncMLMailShortCaption,   L"NewSyncMLMailShortCaption",   "text/plain" }
       
   170     ,
       
   171     // Localizable short caption for the "new postcard" shortcut.
       
   172     { EAiScutResourceNewPostcardShortCaption,     L"NewPostcardShortCaption",     "text/plain" }
       
   173     ,
       
   174     // Localizable short caption for the "new audio message" shortcut.
       
   175     { EAiScutResourceNewAudioMsgShortCaption,     L"NewAudioMsgShortCaption",     "text/plain" }
       
   176     ,
       
   177     // Localizable short caption for the "new message" shortcut.
       
   178     { EAiScutResourceSelectMsgTypeShortCaption,   L"SelectMsgTypeShortCaption",   "text/plain" }
       
   179     ,
       
   180     // Localizable short caption for the "change theme" shortcut.
       
   181     { EAiScutResourceChangeThemeShortCaption,     L"ChangeThemeShortCaption",     "text/plain" }
       
   182 
       
   183 };
       
   184 
       
   185 const TInt KAiScutResourceCount = sizeof( KAiScutResources ) / 
       
   186                                             sizeof( KAiScutResources[0] );
       
   187 
       
   188 
       
   189 // ============================ SERVICES (Events) ==============================
       
   190 
       
   191 /**
       
   192  * Event Ids.
       
   193  */
       
   194 enum TAiScutEventIds
       
   195 {
       
   196     EAiScutEventLaunchByIndex,
       
   197     EAiScutEventLaunchByValue,
       
   198     EAiScutEventShowSettings,
       
   199     EAiScutEventShowSetting,
       
   200     EAiScutEventLaunchFastswap,
       
   201     EAiScutEventLaunchByIndexAlternate,
       
   202     EAiScutEventLoseFocus,
       
   203     EAiScutEventGainFocus
       
   204 };
       
   205 
       
   206 /**
       
   207  * Services that the plug-in can perform.
       
   208  */
       
   209 const TAiContentItem KAiScutEvents[] =
       
   210 {
       
   211     // Launches a shortcut by its index that is delivered as an integer.
       
   212     { EAiScutEventLaunchByIndex, L"LaunchByIndex", "int" }
       
   213     ,
       
   214     // Launches a shortcut by its value that is delivered in a descriptor.
       
   215     { EAiScutEventLaunchByValue, L"LaunchByValue", "str" }
       
   216     ,
       
   217     // Shows the shortcut plug-in settings dialog.
       
   218     { EAiScutEventShowSettings,  L"ShowSettings",  "" }
       
   219     ,
       
   220     // Shows the shortcut plug-in setting.
       
   221     { EAiScutEventShowSetting,  L"ShowSetting",  "" }    
       
   222     ,
       
   223     // Opens the fast swap window    
       
   224     { EAiScutEventLaunchFastswap, L"LaunchFastSwap", "" }
       
   225     ,
       
   226     // Special launching. If the index points to appshell
       
   227     // fastswap is opened. Other special cases can be added to the engine
       
   228     { EAiScutEventLaunchByIndexAlternate, L"LaunchByIndexAlternate", "int" }
       
   229 	,
       
   230     // Used when we move out of a SC button (Needed for Popup-functionality).
       
   231     // index of shortcut is delivered as an integer
       
   232     { EAiScutEventLoseFocus, L"LoseFocus", "int" }
       
   233     ,
       
   234     // Used when we move into a SC button (Needed for Popup-functionality).
       
   235     // index of shortcut is delivered as an integer.
       
   236     { EAiScutEventGainFocus, L"GainFocus", "int" }
       
   237 
       
   238 };
       
   239 
       
   240 #endif // AISCUTCONTENTMODEL_H
       
   241 
       
   242 // End of File.