serviceapifw_plat/liw_criteria_api/inc/liwcommon.hrh
changeset 57 61b27eec6533
parent 45 7aa6007702af
equal deleted inserted replaced
45:7aa6007702af 57:61b27eec6533
     1 /*
       
     2 * Copyright (c) 2003-2005 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:       Declares common constants to be used in both resources and
       
    15 *                C++ code of consumers and providers.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 #ifndef LIW_COMMON_HRH
       
    26 #define LIW_COMMON_HRH
       
    27 
       
    28 // DATA TYPES
       
    29 
       
    30 // CONSTANTS
       
    31 
       
    32 /**
       
    33 * Predefined service commands (UIDs).
       
    34 */
       
    35 enum TLiwServiceCommands
       
    36     {
       
    37     /** Null value. */
       
    38     KLiwCmdNone = 0,
       
    39 
       
    40     /** String Based command */
       
    41     KLiwCmdAsStr = 1,
       
    42 
       
    43     /** Create new content. */
       
    44     KLiwCmdNew = 0x101F864C,
       
    45         
       
    46     /** Edit existing content. */
       
    47     KLiwCmdEdit = 0x101F864D,
       
    48         
       
    49     /** Select content. */
       
    50     KLiwCmdSelect = 0x101F864E,
       
    51     
       
    52     /** View content. */
       
    53     KLiwCmdView = 0x101F864F,
       
    54 
       
    55     /** Create call. */
       
    56     KLiwCmdCall = 0x101F86B0,
       
    57 
       
    58     /** Send content. */
       
    59     KLiwCmdSend = 0x101F86B3,
       
    60 
       
    61     /** Print content. */
       
    62     KLiwCmdPrint = 0x101F8666,
       
    63 
       
    64     /** Assign content. */
       
    65     KLiwCmdAssign = 0x101F8716,
       
    66 
       
    67     /** Share content. */
       
    68     KLiwCmdShare = 0x101F871E,
       
    69 
       
    70     /** Synchronize content. */
       
    71     KLiwCmdSynchronize = 0x101F8724,
       
    72 
       
    73     /** Synchronize selected. */
       
    74     KLiwCmdSynchronizeSelected = 0x1020720C,
       
    75 
       
    76     /** Search content. */
       
    77     KLiwCmdSearch = 0x101F87DF,
       
    78 
       
    79     /** Copy content. */
       
    80     KLiwCmdCopy = 0x101F87DE,
       
    81 
       
    82     /** Show print preview. */
       
    83     KLiwCmdPrintPreview = 0x101FD656,
       
    84     
       
    85     /** Push to talk. */
       
    86     KLiwCmdPoC = 0x101FD657,
       
    87     
       
    88     /** View content in online store. */
       
    89     KLiwCmdViewOnline = 0x102072EA,
       
    90     
       
    91     /** Upload content. */
       
    92     KLiwCmdUpload = 0x102072EB,
       
    93     
       
    94     /** Transfer a range of media files to a remote storage device. */
       
    95     KLiwCmdXpressTransfer = 0x10207430,
       
    96     
       
    97     /** UPnP copy content. */
       
    98     KLiwCmdUPnPCopy = 0x10207431,
       
    99            
       
   100     /** UPnP move content. */          
       
   101     KLiwCmdUPnPMove = 0x10207432,
       
   102 
       
   103     /** UPnP play content. */
       
   104     KLiwCmdUPnPPlay = 0x10207433,
       
   105 
       
   106     /** UPnP open content. */
       
   107     KLiwCmdUPnPOpen = 0x10207434,
       
   108     
       
   109     /** UPnP enable external. */
       
   110     KLiwCmdUPnPEnableExternal = 0x10207435,
       
   111     
       
   112     /** Show help content. */
       
   113     KLiwCmdHelp = 0x10275075,
       
   114     
       
   115     /** Add or remove items from intent. (Should be used as a menu service command). */
       
   116     KLiwCmdIntent = 0x10275114,
       
   117     
       
   118     /** Add items to intent. (Should be used as a base service command). */
       
   119     KLiwCmdAddToIntent = 0x10275115,
       
   120     
       
   121     /** Remove items from intent. (Should be used as a base service command). */
       
   122     KLiwCmdRemoveFromIntent = 0x10275116,
       
   123     
       
   124     /** Client can request that map should be displayed on screen. */ 
       
   125     KLiwCmdMnShowMap = 0x10206904,
       
   126     
       
   127     /** Allows to start navigation to desired destination. */
       
   128     KLiwCmdMnNavigateTo = 0x10206905,
       
   129     
       
   130     /** Starts reverse geocoding request: finding address for given coordinate. */
       
   131     KLiwCmdMnAddrByCoord = 0x10206906,
       
   132     
       
   133     /** Starts geocoding request: finding coordinate by given address. */
       
   134     KLiwCmdMnCoordByAddr = 0x10206907,    
       
   135     
       
   136     /** Allows client to request that user shall select a location from map. */
       
   137     KLiwCmdMnSelectFromMap = 0x10206908,
       
   138     
       
   139     /** Send via Bluetooth. */
       
   140     KLiwCmdSendViaBT = 0x10281894,   
       
   141 	
       
   142     /** Send via Irda. */
       
   143     KLiwCmdSendViaIR = 0x10281895,
       
   144     
       
   145     /** Enterprise telephony. */
       
   146     KLiwCmdEnterpriseTel = 0x20001FC6,  
       
   147 
       
   148     /** Rotate image etc. */
       
   149     KLiwCmdRotate = 0x10281F96,
       
   150     
       
   151     /** Rotate device screen. */
       
   152     KLiwCmdRotateScreen = 0x10281F97,
       
   153     
       
   154     /** Set call image. */
       
   155     KLiwCmdCallImage = 0x1028245E,
       
   156     
       
   157     /** Give different objects to another device using Near Field Communications. */
       
   158     KLiwCmdNFCGive = 0x1028245F,
       
   159     
       
   160     /** SettingWizard Email view activation. */
       
   161     KLiwCmdSettingWizardEmailView = 0x10281C95,
       
   162     
       
   163     /** In-device search. */
       
   164     KLiwCmdContentSearch = 0x10282844,
       
   165     
       
   166 	/** A special service command enabling consumer to attach for all relevant 
       
   167 	LIW services for a certain object. */
       
   168 	KLiwCmdAnyCmdForObject = 0x102823F1,
       
   169 	
       
   170 	/** To support VoIP settings provisioning with plugins **/
       
   171 	KLiwCmdEasyVoIPProvisioning = 0x10283099,
       
   172 	
       
   173 	/** Assign Screensaver*/
       
   174     KLiwCmdAssignScreenSaver = 0x1028309A,
       
   175 
       
   176 	/** Converged service plugin and UI extension plugin*/
       
   177 	KLiwCmdCSCServicePlugins = 0x1020E56F,
       
   178 	KLiwCmdCSCUiExtensionPlugins = 0x10282EF7 
       
   179     };
       
   180 
       
   181 enum TLiwBufferType
       
   182 {
       
   183 	KLiwBufferNone = 0,
       
   184 	KLiwBufferBitmap = 1,
       
   185 	KLiwBufferFile = 2
       
   186 };
       
   187 
       
   188 
       
   189 // Service command strings. These strings are used in service provider's
       
   190 // opaque data field to specify what service command(s) the provider implements.
       
   191 
       
   192 #define KLiwCmdNoneStr                    "00000000"
       
   193 #define KLiwCmdAsStrStr               "00000001" 
       
   194 #define KLiwCmdNewStr                     "101F864C"
       
   195 #define KLiwCmdEditStr                    "101F864D"
       
   196 #define KLiwCmdSelectStr                  "101F864E"
       
   197 #define KLiwCmdViewStr                    "101F864F"
       
   198 #define KLiwCmdPrintStr                   "101F8666"
       
   199 #define KLiwCmdCallStr                    "101F86B0"
       
   200 #define KLiwCmdSendStr                    "101F86B3"
       
   201 #define KLiwCmdAssignStr                  "101F8716"
       
   202 #define KLiwCmdShareStr                   "101F871E"
       
   203 #define KLiwCmdSynchronizeStr             "101F8724"
       
   204 #define KLiwCmdSearchStr                  "101F87DF"
       
   205 #define KLiwCmdCopy                       "101F87DE"
       
   206 #define KLiwCmdPrintPreviewStr            "101FD656"
       
   207 #define KLiwCmdPoCStr                     "101FD657" 
       
   208 #define KLiwCmdSynchronizeSelectedStr     "1020720C"
       
   209 #define KLiwCmdViewOnlineStr              "102072EA" 
       
   210 #define KLiwCmdUploadStr                  "102072EB"
       
   211 #define KLiwCmdXpressTransferStr          "10207430"
       
   212 #define KLiwCmdUPnPCopyStr                "10207431"
       
   213 #define KLiwCmdUPnPMoveStr                "10207432"
       
   214 #define KLiwCmdUPnPPlayStr                "10207433"
       
   215 #define KLiwCmdUPnPOpenStr                "10207434"
       
   216 #define KLiwCmdUPnPEnableExternalStr      "10207435"
       
   217 #define KLiwCmdHelpStr                    "10275075"
       
   218 #define KLiwCmdIntentStr                  "10275114"
       
   219 #define KLiwCmdAddToIntentStr             "10275115"
       
   220 #define KLiwCmdRemoveFromIntentStr        "10275116"
       
   221 #define KLiwCmdMnShowMapStr               "10206904"
       
   222 #define KLiwCmdMnNavigateToStr            "10206905"
       
   223 #define KLiwCmdMnAddrByCoordStr           "10206906"
       
   224 #define KLiwCmdMnCoordByAddrStr           "10206907"
       
   225 #define KLiwCmdMnSelectFromMapStr         "10206908"
       
   226 #define KLiwCmdSendViaBTStr               "10281894"
       
   227 #define KLiwCmdSendViaIRStr               "10281895"
       
   228 #define KLiwCmdEnterpriseTelStr           "20001FC6"
       
   229 #define KLiwCmdRotateStr                  "10281F96"
       
   230 #define KLiwCmdRotateScreenStr            "10281F97"
       
   231 #define KLiwCmdCallImageStr               "1028245E"
       
   232 #define KLiwCmdNFCGiveStr                 "1028245F"
       
   233 #define KLiwCmdSettingWizardEmailViewStr  "10281C95"
       
   234 #define KLiwCmdContentSearchStr           "10282844"
       
   235 #define KLiwCmdAnyCmdForObjectStr         "102823F1"
       
   236 #define KLiwCmdEasyVoIPProvisioningStr    "10283099"
       
   237 #define KLiwCmdAssignScreenSaverStr       "1028309A"
       
   238 #define	KLiwCmdCSCServicePluginsStr  	  "1020E56F"
       
   239 #define	KLiwCmdCSCUiExtensionPluginsStr   "10282EF7" 
       
   240 
       
   241 /**
       
   242 * Service command options (bits) to alter command handling behaviour.
       
   243 */
       
   244 enum TLiwServiceCmdOptions
       
   245     {
       
   246     /**
       
   247     * Consumer wants asynchronous command handling.
       
   248     * The default is synchronous command handling.
       
   249     * In asynchronous case consumer needs to pass a callback to provider.
       
   250     */
       
   251     KLiwOptASyncronous = 0x0001,
       
   252 
       
   253     /**
       
   254     * Consumer wants provider to make a callback to check coming output
       
   255     * parameters prior returning from service command handling.
       
   256     * Consumer needs to pass a callback to provider.
       
   257     */
       
   258     KLiwOptOutParamCheck = 0x0002,
       
   259 
       
   260     /**
       
   261     * Consumer tells provider that it is prepared to handle
       
   262     * callback events for possibly incomplete/wrong parameter list. 
       
   263     */
       
   264     KLiwOptInParamCheck = 0x0004,
       
   265     
       
   266     /**
       
   267     * Consumer wants to cancel an asynchronous LIW service. 
       
   268     * When a consumer wants to cancel the asynchronous service that a provider
       
   269     * is executing, it should call ExecuteMenuCmdL() or ExecuteServiceCmdL() 
       
   270     * with the same parameters as when requesting the service, but set this 
       
   271     * cancel bit on. The cancel operation itself is synchronous, i.e. the 
       
   272     * provider must call the consumer's callback with KLiwEventCanceled before 
       
   273     * the Execute*CmdL() returns.
       
   274     */
       
   275     KLiwOptCancel = 0x0008
       
   276     };
       
   277 
       
   278 
       
   279 /**
       
   280 * Service classes (UID). Technically these are same as service interface UIDs.
       
   281 */
       
   282 enum TLiwServiceClass
       
   283     {
       
   284     /** 
       
   285     * None. 
       
   286     */
       
   287     KLiwClassNone = 0x0,
       
   288 
       
   289     /**
       
   290     * Base service (no UI expected). 
       
   291     * Every other class must implement this always!
       
   292     */
       
   293     KLiwClassBase = 0x200159f5,
       
   294 
       
   295     /** 
       
   296     * Filter service class. 
       
   297     */
       
   298     KLiwClassFilter = 0x101F8651,
       
   299 
       
   300     /** 
       
   301     * Menu service class (offers menu based services).
       
   302     */
       
   303     KLiwClassMenu = 0x101F8652,
       
   304 
       
   305     /** 
       
   306     * Stub service class.
       
   307     */
       
   308     KLiwClassStub = 0x101F8653,
       
   309        
       
   310     /** 
       
   311     * View service class (offers view based services).
       
   312     */
       
   313     KLiwClassView = 0x101F8654,
       
   314 
       
   315     /** 
       
   316     * This class is for R&D purposes.  
       
   317     */
       
   318     KLiwClassDebug = 0x101F866B
       
   319     };
       
   320 
       
   321 
       
   322 /**
       
   323 * Event codes. To be used with HandleNotifyL method.
       
   324 */
       
   325 enum
       
   326     {
       
   327     /**
       
   328     * Asynchronous service informs consumer to prepare itself for 
       
   329     * action. 
       
   330     */
       
   331     KLiwEventStarted = 1,
       
   332 
       
   333     /**
       
   334     * Asynchronous service request completed.
       
   335     */
       
   336     KLiwEventCompleted = 2,
       
   337 
       
   338     /**
       
   339     * Asynchronous service request canceled.
       
   340     */
       
   341     KLiwEventCanceled = 3,
       
   342     
       
   343     /**
       
   344     * Error during asynchronous service request.
       
   345     */
       
   346     KLiwEventError = 4,
       
   347     
       
   348     /**
       
   349     * Relates to KLiwOptOutParamCheck.
       
   350     */
       
   351     KLiwEventOutParamCheck = 5,
       
   352     
       
   353     /**
       
   354     * Relates to KLiwOptInParamCheck.
       
   355     */
       
   356     KLiwEventInParamCheck = 6,
       
   357     
       
   358     /**
       
   359     * Provider informs consumer that service is no longer available or 
       
   360     * has stopped.
       
   361     */
       
   362     KLiwEventStopped = 7,
       
   363     
       
   364     /**
       
   365     * Provider asks consumer whether Exit can be done (needed at least in 
       
   366     * embedded use cases where server application offers Exit possibility 
       
   367     * to end user, but consumer can not allow Exit due to fact that for
       
   368     * example network connections owned by consumer are open and they need 
       
   369     * to be kept alive).    
       
   370     */
       
   371     KLiwEventQueryExit = 8,
       
   372     
       
   373     /**
       
   374     * Provider informs consumer about the ongoing asynchronous
       
   375     * service execution. 
       
   376     */
       
   377     KLiwEventInProgress = 9
       
   378     };
       
   379     
       
   380 // ============================================================================
       
   381 // Menu item flags for LIW consumers.   
       
   382 // ============================================================================ 
       
   383 /** 
       
   384  * Always keep the provider menu items in a submenu. 
       
   385  */
       
   386 #define LIW_CASCADE_ID               0x01010001
       
   387 
       
   388 /** 
       
   389  * Menu item is placed intelligently either to the main level or a submenu. 
       
   390  */
       
   391 #define LIW_INTELLIGENT_CASCADE_ID   0x01010010
       
   392 
       
   393 /** 
       
   394  * Consumer defines the menu title. 
       
   395  */
       
   396 #define LIW_LOCK_SUBMENU_TITLE       0x00000020
       
   397 
       
   398 // ============================================================================
       
   399 // Criteria item flags for LIW consumers.    
       
   400 // ============================================================================
       
   401 /** 
       
   402  * Criteria item loadOptions bit, only providers in ROM are accepted. 
       
   403  */
       
   404 #define LIW_OPTIONS_ROM_ONLY         0x01
       
   405 
       
   406 // ============================================================================
       
   407 // Menu item flags for LIW providers.
       
   408 // ============================================================================
       
   409 /** 
       
   410  * For providers only: Provider suggests the submenu title. 
       
   411  */
       
   412 #define LIW_SUBMENU_TITLE            0x0ff11012
       
   413 
       
   414 #endif // LIW_COMMON_HRH
       
   415 
       
   416 // End of file
       
   417 
       
   418