serviceapifw_plat/liw_criteria_api/inc/liwcommon.rh
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:       Contains common resource declarations for the LIWFW.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 //  INCLUDES
       
    25 #include <liwcommon.hrh>
       
    26 
       
    27 //  MACROS  
       
    28 
       
    29 //  STRUCTURE DEFINITIONS
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // Option item for a criteria.
       
    33 // -----------------------------------------------------------------------------
       
    34 STRUCT LIW_CRITERIA_OPTION
       
    35     {
       
    36     }
       
    37 
       
    38 // -----------------------------------------------------------------------------
       
    39 // Criteria item.
       
    40 // Resource structure to define criteria item consumer.
       
    41 // -----------------------------------------------------------------------------
       
    42 //
       
    43 // Criteria item
       
    44 //
       
    45 STRUCT LIW_CRITERIA_ITEM
       
    46     {
       
    47     // Criteria ID to be used in UI elements referring to this criteria
       
    48     // By default the ID should be same as the serviceCmd, but it can be
       
    49     // different as well e.g. for mapping old menu items to use LIW
       
    50     // This can be consumer defined or predefined, if common interest
       
    51     // is allocated.
       
    52     LONG id;
       
    53 
       
    54     // --------------------------------------------------------------
       
    55     // Actual criteria data used when resolving providers from which
       
    56     // a consumer is interested in.
       
    57     // --------------------------------------------------------------
       
    58 
       
    59     // Command ID for service command, mandatory.
       
    60     LONG serviceCmd = KLiwCmdNone;
       
    61 
       
    62     // Content MIME type, event type or any agreed one.
       
    63     LTEXT8 contentType = "";
       
    64 
       
    65     // Services class tells what kind of service is expected from
       
    66     // provider. See TLiwServiceClass enum for allowed values.
       
    67     // Optional, if not defined the default (KLiwClassMenu) is used.
       
    68     LONG serviceClass = KLiwClassMenu;
       
    69 
       
    70     // --------------------------------------------------------------
       
    71     // Additional options, if any.
       
    72     // --------------------------------------------------------------
       
    73 
       
    74     // Defines UID for default provider. If provider for this
       
    75     // UID exists, all the setup calls will be forwarded to it
       
    76     // first (eg. if default provider implements 'menu' service class, it will
       
    77     // be the first provider to insert its menu items to the consumer menu).
       
    78     LONG defaultProvider = 0;
       
    79 
       
    80     // The maximum number of providers allowed for the criteria item.
       
    81     // There might be cases to limit the number of providers, e.g. for
       
    82     // limiting the number of menu items. Maximum is 255 providers per interest.
       
    83     BYTE maxProviders = 0xff;
       
    84 
       
    85     // Other options bits (8 bits reserved).
       
    86     BYTE loadOptions=0;
       
    87 
       
    88     // Reserved for extensions.
       
    89     LLINK reserved = 0; 
       
    90     }
       
    91 
       
    92 //
       
    93 // Criteria item with command name as string
       
    94 //
       
    95 STRUCT LIW_CRITERIA_ITEM_2
       
    96     {
       
    97     LONG id;
       
    98     LONG serviceCmd = KLiwCmdAsStr;
       
    99     // Service name.
       
   100     LTEXT8 serviceName = "";
       
   101     LTEXT8 contentType = "";
       
   102     LONG serviceClass = KLiwClassMenu;
       
   103 
       
   104     LONG defaultProvider = 0;
       
   105     BYTE maxProviders = 0xff;
       
   106     BYTE loadOptions=0;
       
   107     
       
   108     LLINK reserved = 0;    
       
   109     }
       
   110 
       
   111 //
       
   112 // Interest is an array of criteria items.
       
   113 //
       
   114 STRUCT LIW_INTEREST
       
   115     {
       
   116     STRUCT items[]; // LIW_CRITERIA_ITEM's
       
   117     }
       
   118 
       
   119 // End of File