mds_pub/content_listing_framework_api/inc/CLFContentListing.rh
changeset 0 c53acadfccc6
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     1 /*
       
     2 * Copyright (c) 2002-2009 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 CLFCONTENTLISTING_RH
       
    19 #define CLFCONTENTLISTING_RH
       
    20 
       
    21 
       
    22 //  INCLUDES
       
    23 #include <CLFContentListing.hrh>
       
    24 
       
    25 //  STRUCTURE DEFINITIONS
       
    26 
       
    27 // -----------------------------------------------------------------------------
       
    28 // CLF_FIELD_ID
       
    29 // Field ID
       
    30 // -----------------------------------------------------------------------------
       
    31 //
       
    32 STRUCT CLF_FIELD_ID
       
    33     {
       
    34     LONG field_id;  // TCLFFieldId
       
    35     }
       
    36 
       
    37 // -----------------------------------------------------------------------------
       
    38 // CLF_SORTING_STYLE
       
    39 // Sorting style
       
    40 // Example:
       
    41 // RESOURCE CLF_SORTING_STYLE r_sorting_style
       
    42 //     {
       
    43 //     ordering = ECLFOrderingAscending;
       
    44 //     data_type = ECLFItemDataTypeDesC;
       
    45 //     fields =
       
    46 //         {
       
    47 //         CLF_FIELD_ID { field_id = ECLFFieldIdSongName; },
       
    48 //         CLF_FIELD_ID { field_id = ECLFFieldIdAlbum; }
       
    49 //         };
       
    50 //     }
       
    51 // -----------------------------------------------------------------------------
       
    52 //
       
    53 STRUCT CLF_SORTING_STYLE
       
    54     {
       
    55     WORD version = 1;
       
    56     LONG ordering;      // TCLFSortingStyleOrdering
       
    57     LONG data_type;     // TCLFItemDataType data type of fields
       
    58                                    // TCLFUndefinedItemPosition
       
    59     BYTE undefined_item_position = ECLFSortingStyleUndefinedEnd;
       
    60     STRUCT fields[];    // CLF_FIELD_ID
       
    61     }
       
    62 
       
    63 // -----------------------------------------------------------------------------
       
    64 // CLF_MIME_TYPE_ARRAY
       
    65 // List of mime types
       
    66 // Example:
       
    67 // RESOURCE CLF_MIME_TYPE_ARRAY r_mime_type_array
       
    68 //     {
       
    69 //     mime_types =
       
    70 //         {
       
    71 //         LBUF { txt = "image/*"; },
       
    72 //         LBUF { txt = "audio/*"; }
       
    73 //         };
       
    74 //     }
       
    75 // -----------------------------------------------------------------------------
       
    76 //
       
    77 STRUCT CLF_MIME_TYPE_ARRAY
       
    78     {
       
    79     WORD version = 1;
       
    80     STRUCT mime_types[]; // LBUF
       
    81     }
       
    82 
       
    83 // -----------------------------------------------------------------------------
       
    84 // CLF_MEDIA_TYPE
       
    85 // List of mime types
       
    86 // -----------------------------------------------------------------------------
       
    87 //
       
    88 STRUCT CLF_MEDIA_TYPE
       
    89     {
       
    90     LONG media_type;    // TCLFMediaType
       
    91     }
       
    92 
       
    93 // -----------------------------------------------------------------------------
       
    94 // CLF_MEDIA_TYPE_ARRAY
       
    95 // List of media types
       
    96 // -----------------------------------------------------------------------------
       
    97 //
       
    98 STRUCT CLF_MEDIA_TYPE_ARRAY
       
    99     {
       
   100     WORD version = 1;
       
   101     STRUCT media_types[];   //  CLF_MEDIA_TYPE_ARRAY
       
   102     }
       
   103 
       
   104 // -----------------------------------------------------------------------------
       
   105 // CLF_LIST_MODEL
       
   106 // List model
       
   107 // Example:
       
   108 // RESOURCE CLF_LIST_MODEL r_list_model
       
   109 //     {
       
   110 //     mime_type_array = CLF_MIME_TYPE_ARRAY
       
   111 //         {
       
   112 //         mime_types =
       
   113 //             {
       
   114 //             LBUF { txt = "image/*"; },
       
   115 //             LBUF { txt = "audio/*"; }
       
   116 //             };
       
   117 //         };
       
   118 //     media_type_array = CLF_MEDIA_TYPE_ARRAY
       
   119 //         {
       
   120 //         media_types =
       
   121 //             {
       
   122 //             CLF_MEDIA_TYPE { media_type = ECLFMediaTypeMusic; }
       
   123 //             };
       
   124 //         };
       
   125 //     sorting_style = CLF_SORTING_STYLE
       
   126 //         {
       
   127 //         ordering = ECLFOrderingAscending;
       
   128 //         data_type = ECLFItemDataTypeDesC;
       
   129 //         fields =
       
   130 //             {
       
   131 //             CLF_FIELD_ID { field_id = ECLFFieldIdSongName; },
       
   132 //             CLF_FIELD_ID { field_id = ECLFFieldIdAlbum; }
       
   133 //             };
       
   134 //         };
       
   135 //     }
       
   136 // -----------------------------------------------------------------------------
       
   137 //
       
   138 STRUCT CLF_LIST_MODEL
       
   139     {
       
   140     WORD version = 1;
       
   141     LONG grouping = ECLFNoGrouping; // TCLFGrouping
       
   142     STRUCT mime_type_array;         // CLF_MIME_TYPE_ARRAY
       
   143     STRUCT media_type_array;        // CLF_MEDIA_TYPE_ARRAY
       
   144     STRUCT sorting_style;           // CLF_SORTING_STYLE
       
   145     }
       
   146 
       
   147 // -----------------------------------------------------------------------------
       
   148 // CLF_MEDIA_TYPE_ARRAY
       
   149 // List of media types version 2
       
   150 // There can be multible sortings styles.
       
   151 // First sorting style is primary style, all items is sorted by this style,
       
   152 // if there is items that doesn't have field (undefined items) which is defined in
       
   153 // primary sorting style, then second sorting style is used to those items etc.
       
   154 // -----------------------------------------------------------------------------
       
   155 //
       
   156 STRUCT CLF_LIST_MODEL_V2
       
   157     {
       
   158     WORD version = 2;
       
   159     LONG grouping = ECLFNoGrouping; // TCLFGrouping
       
   160     STRUCT mime_type_array;         // CLF_MIME_TYPE_ARRAY
       
   161     STRUCT media_type_array;        // CLF_MEDIA_TYPE_ARRAY
       
   162     STRUCT sorting_style_array[];   // array of CLF_SORTING_STYLE
       
   163     }
       
   164 
       
   165 
       
   166 #endif      // CLFCONTENTLISTING_RH
       
   167 
       
   168 // End of File