upnpmediaserver/contentdirectoryservice/inc/upnpcontentdirectoryglobals.h
changeset 0 7f85d04be362
child 38 5360b7ddc251
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     1 /** @file
       
     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:  Database for MediaServer
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_UPNPCONTENTDIRECTORYDBGLOBALS_H
       
    19 #define C_UPNPCONTENTDIRECTORYDBGLOBALS_H
       
    20 #include <platform_paths.hrh>
       
    21 #include <bldvariant.hrh>
       
    22 // CONSTANTS
       
    23 
       
    24 // integers
       
    25 const TInt KMaxIntegerLen               = 10;
       
    26 const TInt KMaxIDResLength              = 18;
       
    27 const TInt KMaxLongIntegerLen           = 20;
       
    28 const TInt KMaxBoolLen                  = 1;
       
    29 const TInt KColNameMaxLenth             = 10;
       
    30 const TInt KDefaultGranularity          = 5;
       
    31 const TInt KRespBufGranularity          = 128;
       
    32 const TInt KMinDiskSpace                = 10000;
       
    33 const TInt KDownloadContId              = 1;
       
    34 const TInt KAvailableNestedLevels       = 23;
       
    35 const TInt KMaxUpnpLongStringLen        = 1024;
       
    36 const TInt KMaxUpnpStringLen            = 255;
       
    37 const TInt KCommitEveryNum              = 200;
       
    38 const TInt KOnlyOnePair                 = 2;
       
    39 const TInt KExtensionLength             = 10;
       
    40 const TInt KThumbnailWidth              = 40; 
       
    41 const TInt KThumbnailHeight             = 30;
       
    42 const TInt KDefaultThumbnailSize        = 5120; // 5 kb
       
    43 const TInt KHttpGetStarted              = 800;  
       
    44 const TInt KHttpPostStarted             = 801;  
       
    45 const TInt KThumbnailDirLen             = 10;
       
    46 const TInt KCompactWeight               = 10000; // specify how often 
       
    47 const TInt KDeleteWeight                = 5;   // Compact function is called.
       
    48 const TInt KExecuteWeight               = 1;   
       
    49 const TInt KCharSize                    = 2;                                                  
       
    50 const TInt KAutoDestroyTimeLimit        = 35000000;
       
    51 const TInt KMapKeyMaxLength             = 32;
       
    52 const TInt KRandomMax                   = 8999;
       
    53 const TInt KRandomMin                   = 1000;
       
    54 const TInt KRandomRangeLength           = 4;
       
    55 const TInt KMaxSlashAmount              = 4;
       
    56 const TInt KCharLen						= 1;   
       
    57 
       
    58 // files
       
    59 _LIT(  KObjectsXmlFileName,             "z:objects.xml"                     );
       
    60 _LIT(  KDefaultMediaDrive,              "C:"                                );
       
    61 _LIT(  KMediaPath,                      "Media"                             );
       
    62 _LIT(  KDownloadPath,                   "Download"                          );
       
    63 _LIT8( KMediaPath8,                     "Media"                             );
       
    64 _LIT(  KThumbnailPath,                  "Thumbnail"                         );
       
    65 _LIT(  KSearchThumbnailPathPattern,     "/Thumbnail/"                       );
       
    66 _LIT(  KMediaThumbnailPath,             "Media/Thumbnail"                   );
       
    67 _LIT(  KMainDir,                        "\\"                                );
       
    68 _LIT(  KDiskPathElSep,                  "\\"                                );
       
    69 _LIT(  KSlash,                          "/"                                 );
       
    70 _LIT(  KDefaultThumbExtension,          ".jpeg"                             );
       
    71 _LIT(  KThumbDirectory11,               "Thumbnail\\"                       );
       
    72 _LIT8( KThumbMimeType,                  "image/jpeg"                        );
       
    73 _LIT(  KDefaultUploadDir,               "data\\Download\\Media\\"			);
       
    74 _LIT(  KThumbnailSubDir,                "thumbnail\\"                       );
       
    75 
       
    76 
       
    77 // common strings
       
    78 _LIT(  KSemicolon,                      ";"                                 );
       
    79 _LIT8( KSemicolon8,                     ";"                                 );
       
    80 _LIT(  KCol,                            ":"                                 );
       
    81 _LIT(  KCommaStr,                       ","                                 );
       
    82 _LIT8( KCommaStr8,                      ","                                 );
       
    83 _LIT(  KFalseString,                    "false"                             );
       
    84 _LIT8( KFalseString8,                   "false"                             );
       
    85 _LIT(  KFalseValue,                     "0"                                 );
       
    86 _LIT8( KFalseValue8,                    "0"                                 );
       
    87 _LIT(  KAsterisk,                       "*"                                 );
       
    88 _LIT8( KAsterisk8,                      "*"                                 );
       
    89 _LIT(  KAtStr,                          "@"                                 );
       
    90 _LIT8( KAtStr8,                         "@"                                 );
       
    91 _LIT8( KHash8,                          "#"                                 );
       
    92 _LIT8( KHashASCII8,                     "%23"                               );
       
    93 _LIT(  KMinusOne,                       "-1"                                );
       
    94 _LIT8( KMinusOne8,                      "-1"                                );
       
    95 _LIT(  KDot,                            "."                                 );
       
    96 _LIT8( KDot8,                           "."                                 );
       
    97 _LIT(  KPathSeparator,                  "."                                 );
       
    98 _LIT8( KPathSeparator8,                 "."                                 );
       
    99 _LIT(  KQuot,                           "'"                                 );
       
   100 _LIT(  KUndersc,                        "_"                                 );
       
   101  
       
   102 _LIT(  KTrueString,                     "true"                              );
       
   103 _LIT8( KTrueString8,                    "true"                              );
       
   104 _LIT(  KTrueValue,                      "1"                                 );
       
   105 _LIT8( KTrueValue8,                     "1"                                 );
       
   106 _LIT(  KNullString,                     ""                                  );
       
   107 _LIT(  KSpc,                            " "                                 );
       
   108 
       
   109 // 8bit strings
       
   110 _LIT8( KNewLine,                        "\r\n"                              );
       
   111 _LIT8( KLF8,                            "\n"                                );
       
   112 _LIT8( KTwoSpaces,                      "  "                                );
       
   113 _LIT8( KNullString8,                    ""                                  );
       
   114 
       
   115 // anyContainer support
       
   116 _LIT8( KAnyContainerIndicator8,         "DLNA.ORG_AnyContainer"             );
       
   117 _LIT(  KAnyContainerIndicator,          "DLNA.ORG_AnyContainer"             );
       
   118 const TInt KAnyContainerId              = 1;
       
   119 
       
   120 // forbidden paths
       
   121 _LIT8( KForbiddenDrivez,                "z"                                 );
       
   122 _LIT8( KForbiddenDriveZ,                "Z"                                 );
       
   123 _LIT8( KForbiddenPrivatePattern,        "/?/private*"                       );
       
   124 
       
   125 
       
   126 // Database structures' names
       
   127 // object table
       
   128 _LIT(  KObjectTableName,                "object"                            );
       
   129 _LIT8( KObjectTableName8,               "object"                            );
       
   130 _LIT(  KObjIdColName,                   "id"                                );
       
   131 _LIT(  KObjParentIdColName,             "parentID"                          );
       
   132 _LIT(  KObjTiltleColName,               "title"                             );
       
   133 _LIT8( KObjTiltleColName8,              "title"                             );
       
   134 _LIT(  KObjClassColName,                "class"                             );
       
   135 _LIT8( KObjClassColName8,               "class"                             );
       
   136 _LIT(  KObjRestrictedColName,           "restricted"                        );
       
   137 _LIT(  KObjSearchableColName,           "searchable"                        );
       
   138 _LIT(  KObjRefIdColName,                "refID"                             );
       
   139 _LIT(  KObjPathColName,                 "path"                              );
       
   140 _LIT(  KObjIdIndexName,                 "obj_id_index"                      );
       
   141 _LIT(  KRefIdIndexName,                 "ref_id_index"                      );
       
   142 // element table
       
   143 _LIT(  KElementTableName,               "element"                           );
       
   144 _LIT8( KElementTableName8,              "element"                           );
       
   145 _LIT(  KElmIdColName,                   "elm_id"                            );
       
   146 _LIT(  KElmNameColName,                 "elm_name"                          );
       
   147 _LIT(  KElmHasAttrColName,              "elm_has_attribute"                 );
       
   148 _LIT(  KElmObjIdColName,                "elm_obj_id"                        );
       
   149 _LIT(  KElmValueColName,                "elm_value"                         );
       
   150 _LIT(  KElmIsRequiredColName,           "elm_is_required"                   );
       
   151 _LIT(  KElmIdIndexName,                 "elm_id_index"                      );
       
   152 _LIT(  KElmObjIdIndexName,              "elm_obj_id_index"                  );
       
   153 // attributes table 
       
   154 _LIT(  KAttributeTableName,             "attribute"                         );
       
   155 _LIT8( KAttributeTableName8,            "attribute"                         );
       
   156 _LIT(  KAtrIdColName,                   "atr_id"                            );
       
   157 _LIT(  KAtrNameColName,                 "atr_name"                          );
       
   158 _LIT(  KAtrElmIdColName,                "atr_elm_id"                        );
       
   159 _LIT(  KAtrObjIdColName,                "atr_elm_id"                        );
       
   160 _LIT(  KAtrValueColName,                "atr_value"                         );
       
   161 _LIT(  KAtrIsRequiredColName,           "atr_is_required"                   );
       
   162 _LIT(  KAtrIdIndexName,                 "atr_id_index"                      );
       
   163 _LIT(  KAtrElmIdIndexName,              "atr_elm_id_index"                  );
       
   164 _LIT(  KAtrIdObjColName,                "atr_id_obj"                        );
       
   165 // resources table
       
   166 _LIT(  KResourcesTableName,             "resources"                         );
       
   167 _LIT(  KRscIdColName,                   "rsc_id"                            );
       
   168 _LIT(  KRscPathColName,                 "rsc_path"                          );
       
   169 _LIT(  KRscReadonlyColName,             "rsc_readonly"                      );
       
   170 _LIT(  KRscThumbnailColName,            "rsc_thumbnail"                     );
       
   171 _LIT(  KRscIdObjIndexName,              "rsc_id_obj_index"                  );
       
   172 _LIT(  KRscIdIndexName,                 "rsc_id_index"                      );
       
   173 _LIT(  KRscIdObjColName,                "rsc_id_obj"                        );
       
   174 // sequences table
       
   175 _LIT(  KSequencesTableName,             "sequences"                         );
       
   176 _LIT(  KSeqColNameColName,              "seq_col_name"                      );
       
   177 _LIT(  KSeqNextKeyColName,              "seq_next_key"                      );
       
   178 _LIT(  KSeqColNameIndexName,            "seq_col_name_index"                );
       
   179 // importUri sequence
       
   180 _LIT(  KImportUriId,                    "uriId"                             );
       
   181 _LIT8( KImportUriId8,                   "uriId"                             );
       
   182 // database name
       
   183 _LIT(  KDatabaseFileName,               "c:AVMediaServerStore"              );
       
   184 
       
   185 // upnp 
       
   186 _LIT8( KContainerClass8,                "object.container"                  );
       
   187 _LIT(  KItemClass,                      "object.item"                       );
       
   188 _LIT8( KClassTagName,                   "class"                             );
       
   189 _LIT8( KTitleTagName,                   "title"                             );
       
   190 _LIT(  KClassTagNameWithNs,             "upnp:class"                        );
       
   191 _LIT8( KClassTagNameWithNs8,            "upnp:class"                        );
       
   192 _LIT(  KTitleTagNameWithNs,             "dc:title"                          );
       
   193 _LIT8( KTitleTagNameWithNs8,            "dc:title"                          );
       
   194 _LIT(  KResStr,                         "res"                               );
       
   195 _LIT8( KMimeBegin,                      "&quot;http-get:*:"                 );
       
   196 _LIT8( KMimeEnd,                        ":*&quot;"                          );
       
   197 _LIT8( KItemTypeImage,                  "imageItem"                         );
       
   198 _LIT8( KItemTypeAudio,                  "audioItem"                         );
       
   199 _LIT8( KItemTypeVideo,                  "videoItem"                         );
       
   200 _LIT8( KHTTPHeader,                     "http://"                           );
       
   201 _LIT8( KDrmMatchString,                 "<xmrcc:*/*>*"                      );
       
   202 _LIT8( KRequiredAtrName,                "el_required"                       );
       
   203 _LIT8( KRequiredAtrSuf,                 "_req"                              );
       
   204 _LIT8( KRequiredAtrSufPattern,          "*_req"                             );
       
   205 _LIT8( KProtInfoReqAtrSufPattern,       "protocolInfo_req"                  );
       
   206 _LIT8( KIpPortPlaceholder8,             "___.___.___.___:_____"             );
       
   207 _LIT(  KIpPortPlaceholder,              "___.___.___.___:_____"             );
       
   208 _LIT8( KTitle,                          "title"                             );
       
   209 _LIT8( KProInfoBegin,                   "http-get:*:"                       );
       
   210 _LIT8( KProInfoEnd,                     ":*"                                );
       
   211 _LIT8( KCompleted,                      "COMPLETED"                         );
       
   212 _LIT8( KError,                          "ERROR"                             );
       
   213 _LIT8( KInProgress,                     "IN_PROGRESS"                       );
       
   214 _LIT8( KStopped,                        "STOPPED"                           );
       
   215 _LIT8( KBrowseChilds,                   "BrowseDirectChildren"              );
       
   216 _LIT8( KBrowseFlag,                     "BrowseFlag"                        );
       
   217 _LIT8( KBrowseMeta,                     "BrowseMetadata"                    );
       
   218 _LIT8( KContainerID,                    "ContainerID"                       );
       
   219 _LIT8( KChildCount,                     "childCount"                        );
       
   220 _LIT(  KChildCount16,                   "childCount"                        );
       
   221 _LIT8( KContainer,                      "container"                         );
       
   222 _LIT8( KContainerUpdateIDs,             "ContainerUpdateIDs"                );
       
   223 _LIT8( KCurrentTagValue,                "CurrentTagValue"                   );
       
   224 _LIT8( KDcNsPrefix,                     "dc"                                );
       
   225 _LIT8( KDestinationURI,                 "DestinationURI"                    );
       
   226 _LIT8( KDidlEnd,                        "</DIDL-Lite>"                      );
       
   227 _LIT8( KXmlnsNsUri,                     "urn:schemas-upnp-org:"
       
   228                                         "metadata-1-0/DIDL-Lite/"           );
       
   229 _LIT8( KCmlnsNsPref,                    "xmlns"                             );
       
   230 _LIT8( KDcNsUri,                        "http://purl.org/dc/elements/1.1/"  );
       
   231 _LIT8( KDcNsPref,                       "dc"                                );
       
   232 _LIT8( KUpnpNsUri,                      "urn:schemas-upnp-org:"
       
   233                                         "metadata-1-0/upnp/"                );
       
   234 _LIT8( KUpnpNsPref,                     "upnp");
       
   235 _LIT8( KDidlTag,                        "<DIDL-Lite xmlns=\"urn:schemas-upnp"
       
   236                                         "-org:metadata-1-0/DIDL-Lite/\" "
       
   237                                         "xmlns:dc=\"http://purl.org/dc/"
       
   238                                         "elements/1.1/\" xmlns:upnp=\"urn:"
       
   239                                         "schemas-upnp-org:metadata-1-0/upnp"
       
   240                                         "/\" xmlns:dlna=\"urn:schemas-dlna-"
       
   241                                         "org:metadata-1-0\">");
       
   242 _LIT8( KElements,                       "Elements"                          );
       
   243 _LIT8( KFilter,                         "Filter"                            );
       
   244 _LIT8( KId,                             "Id"                                );
       
   245 _LIT8( KIdAttrName,                     "id"                                );
       
   246 _LIT(  KimportUri,                      "importUri"                         );
       
   247 _LIT8( KImportUri8,                     "importUri"                         );
       
   248 _LIT8( KItem,                           "item"                              );
       
   249 _LIT8( KNumberReturned,                 "NumberReturned"                    );
       
   250 _LIT8( KNewID,                          "NewID"                             );
       
   251 _LIT8( KNewTagValue,                    "NewTagValue"                       );
       
   252 _LIT8( KParentID,                       "parentID"                          );
       
   253 _LIT8( KRefID,                          "refID"                             );
       
   254 _LIT8( KRequestedCount,                 "RequestedCount"                    );
       
   255 _LIT8( KResourceURI,                    "ResourceURI"                       );
       
   256 _LIT8( KRestricted,                     "restricted"                        );
       
   257 _LIT8( KResult,                         "Result"                            );
       
   258 _LIT8( KCreator8,                       "dc:creator"                        );
       
   259 _LIT8( KDate8,                       "date"                        );
       
   260 _LIT8( KDuration8,                       "duration"                        );
       
   261 _LIT8( KSearchCaps,                     "SearchCaps"                        );
       
   262 _LIT8( KSearchCapabilities,             "");
       
   263 
       
   264 _LIT8( KSearchCapsVariableName,         "SearchCapabilities"                ); 
       
   265 
       
   266 _LIT8( KSearchClassTag,                 "<upnp:searchClass>"                );
       
   267 _LIT8( KSearchClassTagEnd,              "</upnp:searchClass>"               );
       
   268 _LIT8( KSize,                           "size"                              );
       
   269 _LIT8( KStartingIndex,                  "StartingIndex"                     );
       
   270 _LIT8( KSortCaps,                       "SortCaps"                          );
       
   271 _LIT8( KSortCapsVariableName,           "SortCapabilities"                  );
       
   272 _LIT8( KSortCapabilities,               ""                                  );
       
   273 _LIT8( KSortCriteria,                   "SortCriteria"                      );
       
   274 _LIT8( KSourceURI,                      "SourceURI"                         );
       
   275 _LIT8( KSystemUpdateID,                 "SystemUpdateID"                    );
       
   276 _LIT8( KTransferID,                     "TransferID"                        );
       
   277 _LIT8( KTransferIDs,                    "TransferIDs"                       );
       
   278 _LIT8( KTransferStatus,                 "TransferStatus"                    );
       
   279 _LIT8( KTransferLength,                 "TransferLength"                    );
       
   280 _LIT8( KTransferTotal,                  "TransferTotal"                     );
       
   281 _LIT8( KTotalMatches,                   "TotalMatches"                      );
       
   282 _LIT8( KUpnpNsPrefix,                   "upnp"                              );
       
   283 _LIT8( KUpdateID,                       "UpdateID"                          );
       
   284 _LIT8( KHttpTag,                        "http://"                           );
       
   285 _LIT(  KHttpTag16,                      "http://"                           );
       
   286 _LIT8( KprotocolInfo,                   "protocolInfo"                      );
       
   287 _LIT(  KProtocolInfo,                   "protocolInfo"                      );
       
   288 _LIT8( KDlnaPrefix,                     "dlna"                              );
       
   289 _LIT8( KDlnaProfileID,                  "dlna:profileID"                    );
       
   290 _LIT8( KProfileID,                      "profileID"                         );
       
   291 _LIT8( KDefaultProfileID,               "JPEG_TN"                           );
       
   292 _LIT8( KAlbumArtURI,                    "upnp:albumArtURI"                  );
       
   293 _LIT8( KXmlnsDlna,                      "urn:schemas-dlna-org:metadata-1-0/");
       
   294 _LIT8( KEmptyProtocolInfoVal8,          "http-get:*:*:*"                    );
       
   295 _LIT8( KRootNode,                       "<DIDL-Lite xmlns:dc=\"http://purl."
       
   296                                         "org/dc/elements/1.1/\" xmlns:upnp="
       
   297                                         "\"urn:schemas-upnp-org:metadata-1-"
       
   298                                         "0/upnp/\" xmlns=\"urn:schemas-upnp"
       
   299                                         "-org:metadata-1-0/DIDL-Lite/\">"   );
       
   300 _LIT8( KSearchable,                     "searchable"                        );
       
   301 _LIT8( KUpdateIds,                      "0,0"                               );
       
   302 _LIT8( KBrowse,                         "Browse"                            );
       
   303 _LIT8( KCreateReference,                "CreateReference"                   );
       
   304 _LIT8( KCreateObject,                   "CreateObject"                      );
       
   305 _LIT8( KDeleteResource,                 "DeleteResource"                    );
       
   306 _LIT8( KDestroyObject,                  "DestroyObject"                     );
       
   307 _LIT8( KExportResource,                 "ExportResource"                    );
       
   308 _LIT8( KGetSearchCapabilities,          "GetSearchCapabilities"             );
       
   309 _LIT8( KGetSortCapabilities,            "GetSortCapabilities"               );
       
   310 _LIT8( KGetSystemUpdateID,              "GetSystemUpdateID"                 ); 
       
   311 _LIT8( KGetTransferProgress,            "GetTransferProgress"               );
       
   312 _LIT8( KImportResource,                 "ImportResource"                    );
       
   313 _LIT8( KSearch,                         "Search"                            );
       
   314 _LIT8( KStopTransferResource,           "StopTransferResource"              );
       
   315 _LIT8( KMetadata,                       "urn:schemas-upnp-org:metadata"
       
   316                                         "-1-0/upnp/"                        );
       
   317 _LIT8( KXmlNsDc,                        "xmlns:dc=\"http://purl.org/dc"
       
   318                                         "/elements/1.1/\""                  );
       
   319 _LIT8( KType,                           "type"                              ); 
       
   320 _LIT8( KElement,                        "e"                                 );
       
   321 _LIT8( KClass,                          "class"                             );
       
   322 _LIT8( KImportUri,                      "importUri"                         );
       
   323 _LIT(  KImportUri16,                    "importUri"                         );
       
   324 _LIT8( KCharR,                          "r"                                 ); 
       
   325 _LIT8( KIParent,                        "i"                                 );
       
   326 _LIT8( KProperties,                     "ps"                                );
       
   327 _LIT8( KName,                           "n"                                 );
       
   328 _LIT8( KAttribute,                      "Attribute"                         );
       
   329 _LIT8( KResAttr,                        "res"                               );
       
   330 _LIT8( KMultiple,                       "m"                                 );
       
   331 _LIT8( KRes,                            "res"                               );
       
   332 _LIT(  KRes16,                          "res"                               );
       
   333 _LIT8( KNestAttr,                       "a"                                 );
       
   334 _LIT8( KObject,                         "object"                            );
       
   335 _LIT8( KDidlLite,                       "DIDL-Lite"                         );
       
   336 _LIT8( KTrue,                           "true"                              );
       
   337 _LIT8( KObjectProperty,                 "p"                                 );
       
   338 _LIT8( KObjectName,                     "n"                                 );
       
   339 _LIT8( KRequiredObject,                 "r"                                 );
       
   340 _LIT8( KMultiValueObject,               "m"                                 );
       
   341 _LIT8( KVendorDescriptor,               "desc"                              );
       
   342 _LIT8( KColon8,                         ":"                                 );
       
   343 _LIT8( KArtist,                         "artist"                            );
       
   344 _LIT8( KAlbum,                          "album"                             );
       
   345 _LIT8( KImageMime,                      "image"                             );
       
   346 _LIT8( KTextMime,                       "text"                              );
       
   347 _LIT8( KVideoMime,                      "video"                             );
       
   348 _LIT8( KAudioMime,                      "audio"                             );
       
   349 _LIT8( KObjectClassAudioItem,           "object.item.audioItem"             );
       
   350 _LIT8( KObjectClassVideoItem,           "object.item.videoItem"             );  
       
   351 _LIT8( KObjectClassTextItem,            "object.item.textItem"              );    
       
   352 _LIT8( KObjectClassImageItem,           "object.item.imageItem"             );      
       
   353 _LIT8( KJpegLrg,                        "JPEG_LRG"                          );
       
   354 _LIT8( KJpegMed,                        "JPEG_MED"                          );
       
   355 _LIT8( KJpegSm,                         "JPEG_SM"                           );
       
   356 
       
   357 // SQL Strings
       
   358 _LIT(  KDeleteFromSqlCmd,               "DELETE FROM %S WHERE %S=%S"        );
       
   359 _LIT(  KOpenParant,                     "("                                 );
       
   360 _LIT(  KValuesOpen,                     " VALUES("                          );
       
   361 _LIT(  KCloseParant,                    ")"                                 );
       
   362 _LIT(  KInsertInto,                     "INSERT INTO "                      );
       
   363 _LIT(  KOnlyRequiredFromElement,        " AND elm_is_required=1"            );
       
   364 _LIT(  KNamedElFromElement,             " AND elm_name='%S'"                );
       
   365 _LIT(  KSelectFromObjectSqlCmd,         "SELECT %S FROM object WHERE id=%d" );
       
   366 _LIT(  KOnlyRequiredFromAtr,            " AND atr_is_required=1"            );
       
   367 _LIT(  KNamedAtrFromAttribute,          " AND atr_name='%S'"                );
       
   368 _LIT(  KFullPathFromShareMap,           " OR %S='%S'"                       );
       
   369 _LIT(  KSelectFromSqlCmd,               "SELECT %S FROM %S WHERE %S='%S'"   );
       
   370 _LIT(  KSelectFromNumSqlCmd,            "SELECT %S FROM %S WHERE %S=%d"     );
       
   371 _LIT(  KSelectFromNumNotEqSqlCmd,       "SELECT %S FROM %S WHERE %S<>%d"    );
       
   372 _LIT(  KAndConditionSqlCmd,             " AND %S='%S'"                      );
       
   373 _LIT(  KAndLikeConditionSqlCmd,         " AND %S LIKE '*%S'"               );
       
   374 _LIT(  KSelectAttributeByValueSqlCmd,   "SELECT * FROM attribute WHERE atr_value LIKE '*%S*' AND atr_name = '%S' ");
       
   375 _LIT(  KNewMediaDirSqlCmd,              "UPDATE resources SET rsc_readonly=1 WHERE rsc_path LIKE '%S*' AND rsc_readonly=0");
       
   376 _LIT(  KInsertElementSqlCmd,            "INSERT INTO element (elm_id,elm_name,elm_value,elm_has_attribute,elm_obj_id,elm_is_required)VALUES(%d,'%S','%S',%d,%d,%d)");
       
   377 _LIT(  KInsertAttributeSqlCmd,          "INSERT INTO attribute(atr_id,atr_name,atr_value,atr_elm_id,atr_is_required) VALUES(%d,'%S','%S',%d,%d)");
       
   378 _LIT(  KGetObjectListSqlCmd,            "SELECT id FROM object WHERE parentID=%d");
       
   379 _LIT(  KGetItemListSqlCmd,              "SELECT id FROM object WHERE parentID=%d AND class LIKE 'object.item*'");
       
   380 _LIT(  KGetContainerListSqlCmd,         "SELECT id FROM object WHERE parentID=%d AND class LIKE 'object.container*'");
       
   381 _LIT(  KSelectIdFromElSqlCmd,           "SELECT elm_id, elm_name, elm_value FROM element WHERE elm_obj_id=%d" );
       
   382 _LIT(  KDeleteResElSqlCmd,              "DELETE FROM element WHERE elm_value='%S' AND elm_obj_id=%d");
       
   383 _LIT(  KSelectObjectFromObjSqlCmd,      "SELECT id, parentID, title, class, restricted, searchable, refID FROM object WHERE id = %d");
       
   384 _LIT(  KSelectElmFromElmSqlCmd,         "SELECT elm_name, elm_value, elm_has_attribute, elm_id, elm_is_required FROM element WHERE elm_obj_id = %d");
       
   385 _LIT(  KSelectAtrFromAttrSqlCmd,        "SELECT atr_name, atr_value FROM attribute WHERE atr_elm_id = %d");
       
   386 _LIT(  KSelectAtrFromAttrByObjSqlCmd,   "SELECT atr_name, atr_value, atr_elm_id FROM attribute WHERE atr_id_obj = %d");
       
   387 
       
   388 // initial data
       
   389 _LIT(  KInit1,                          "INSERT INTO object (id,parentID,title,class,restricted,searchable,path) VALUES(0,-1,'root','object.container',0,1,'-1')");
       
   390 _LIT(  KInit2,                          "INSERT INTO object (id,parentID,title,class,restricted,searchable,path) VALUES(1,0,'Uploaded','object.container',0,1,'-1.0')");
       
   391 _LIT(  KInit3,                          "INSERT INTO sequences(seq_col_name,seq_next_key) VALUES('object',2)" );
       
   392 _LIT(  KInit4,                          "INSERT INTO sequences(seq_col_name,seq_next_key) VALUES('element',0)");
       
   393 _LIT(  KInit5,                          "INSERT INTO sequences(seq_col_name,seq_next_key) VALUES('attribute',0)");
       
   394 _LIT(  KInit6,                          "INSERT INTO sequences(seq_col_name,seq_next_key) VALUES('uriId',1)"  );
       
   395 
       
   396 
       
   397 enum TCurrentAction 
       
   398 {
       
   399     EUndefinedAction = 0,
       
   400     ECreateObjectAction = 1,
       
   401 };
       
   402 
       
   403 #endif //C_UPNPCONTENTDIRECTORYDBGLOBALS_H
       
   404 // End of File