contentstorage/inc/cadef.h
author hgs
Fri, 16 Apr 2010 14:45:49 +0300
changeset 92 782e3408c2ab
parent 89 1e87eb3b400f
child 93 82b66994846c
permissions -rw-r--r--
201015
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
85
7feec50967db 201003_02
hgs
parents:
diff changeset
     1
/*
7feec50967db 201003_02
hgs
parents:
diff changeset
     2
 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
7feec50967db 201003_02
hgs
parents:
diff changeset
     3
 * All rights reserved.
7feec50967db 201003_02
hgs
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
7feec50967db 201003_02
hgs
parents:
diff changeset
     5
 * under the terms of "Eclipse Public License v1.0"
7feec50967db 201003_02
hgs
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
7feec50967db 201003_02
hgs
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
7feec50967db 201003_02
hgs
parents:
diff changeset
     8
 *
7feec50967db 201003_02
hgs
parents:
diff changeset
     9
 * Initial Contributors:
7feec50967db 201003_02
hgs
parents:
diff changeset
    10
 * Nokia Corporation - initial contribution.
7feec50967db 201003_02
hgs
parents:
diff changeset
    11
 *
7feec50967db 201003_02
hgs
parents:
diff changeset
    12
 * Contributors:
7feec50967db 201003_02
hgs
parents:
diff changeset
    13
 *
7feec50967db 201003_02
hgs
parents:
diff changeset
    14
 * Description:  Definition of different constants
92
hgs
parents: 89
diff changeset
    15
 *  Version     : %version: 10.1.12 % << Don't touch! Updated by Synergy at check-out.
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    16
 *
7feec50967db 201003_02
hgs
parents:
diff changeset
    17
 */
7feec50967db 201003_02
hgs
parents:
diff changeset
    18
7feec50967db 201003_02
hgs
parents:
diff changeset
    19
#ifndef CADEF_H
7feec50967db 201003_02
hgs
parents:
diff changeset
    20
#define CADEF_H
7feec50967db 201003_02
hgs
parents:
diff changeset
    21
7feec50967db 201003_02
hgs
parents:
diff changeset
    22
#include <e32base.h>
7feec50967db 201003_02
hgs
parents:
diff changeset
    23
#include "cainternaltypes.h"
7feec50967db 201003_02
hgs
parents:
diff changeset
    24
89
hgs
parents: 88
diff changeset
    25
hgs
parents: 88
diff changeset
    26
// database version
hgs
parents: 88
diff changeset
    27
_LIT( KCaDbVersion, "00001" ); 
hgs
parents: 88
diff changeset
    28
hgs
parents: 88
diff changeset
    29
hgs
parents: 88
diff changeset
    30
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    31
// ---------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
    32
//Ca constants
7feec50967db 201003_02
hgs
parents:
diff changeset
    33
7feec50967db 201003_02
hgs
parents:
diff changeset
    34
enum TChangeType
7feec50967db 201003_02
hgs
parents:
diff changeset
    35
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
    36
    EAddChangeType,
7feec50967db 201003_02
hgs
parents:
diff changeset
    37
    ERemoveChangeType,
7feec50967db 201003_02
hgs
parents:
diff changeset
    38
    EUpdateChangeType
7feec50967db 201003_02
hgs
parents:
diff changeset
    39
    };
7feec50967db 201003_02
hgs
parents:
diff changeset
    40
7feec50967db 201003_02
hgs
parents:
diff changeset
    41
enum TEntryRole
7feec50967db 201003_02
hgs
parents:
diff changeset
    42
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
    43
    ENoneEntryRole = 0,
7feec50967db 201003_02
hgs
parents:
diff changeset
    44
    EItemEntryRole = 1,
7feec50967db 201003_02
hgs
parents:
diff changeset
    45
    EGroupEntryRole = 2
7feec50967db 201003_02
hgs
parents:
diff changeset
    46
    };
7feec50967db 201003_02
hgs
parents:
diff changeset
    47
7feec50967db 201003_02
hgs
parents:
diff changeset
    48
//Entry flags
7feec50967db 201003_02
hgs
parents:
diff changeset
    49
enum TEntryFlag
7feec50967db 201003_02
hgs
parents:
diff changeset
    50
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
    51
    EUsed = 1,
7feec50967db 201003_02
hgs
parents:
diff changeset
    52
    ESystem = 2,
7feec50967db 201003_02
hgs
parents:
diff changeset
    53
    ERemovable = 4,
7feec50967db 201003_02
hgs
parents:
diff changeset
    54
    EVisible = 8,
7feec50967db 201003_02
hgs
parents:
diff changeset
    55
    ERunning = 16,
7feec50967db 201003_02
hgs
parents:
diff changeset
    56
    ENative = 32,
7feec50967db 201003_02
hgs
parents:
diff changeset
    57
    EMissing = 64
7feec50967db 201003_02
hgs
parents:
diff changeset
    58
    };
7feec50967db 201003_02
hgs
parents:
diff changeset
    59
// Ca - Application
92
hgs
parents: 89
diff changeset
    60
hgs
parents: 89
diff changeset
    61
_LIT( KCaTypeMenuCollections, "menucollections" );
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    62
_LIT( KCaTypeFolder, "folder" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    63
_LIT( KCaTypeCollection, "collection" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    64
_LIT( KCaTypeApp, "application" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    65
_LIT( KCaTypeWidget, "widget" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    66
_LIT( KCaTypeUrl, "url" );
92
hgs
parents: 89
diff changeset
    67
_LIT( KCaTypePackage, "package" );
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    68
_LIT( KCaAttrView, "view" ); ///< View.
7feec50967db 201003_02
hgs
parents:
diff changeset
    69
_LIT( KCaAttrUrl, "url" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    70
_LIT( KCaAttrWindowGroupId, "window_group_id" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    71
_LIT( KCaTypeCollectionDownload, "collection::downloaded" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    72
_LIT( KCaPackageUid,"packageuid");
87
hgs
parents: 86
diff changeset
    73
_LIT( KCaAttrInstallationTime, "installationTime");
88
hgs
parents: 87
diff changeset
    74
_LIT( KCaTypeTemplatedApp, "templatedApplication" );
92
hgs
parents: 89
diff changeset
    75
_LIT( KCaAttrAppType, "apptype");
hgs
parents: 89
diff changeset
    76
_LIT( KCaAttrAppTypeValueJava, "java");
hgs
parents: 89
diff changeset
    77
_LIT( KCaAttrAppTypeValueCWRT, "cwrt");
hgs
parents: 89
diff changeset
    78
_LIT( KCaAttrAppTypeValueNative, "native");
hgs
parents: 89
diff changeset
    79
_LIT( KCaAttrComponentId, "component_id" );
hgs
parents: 89
diff changeset
    80
_LIT( KCaAttrAppSettingsPlugin, "app_settings_plugin");
hgs
parents: 89
diff changeset
    81
// app settings plugin for java apps
hgs
parents: 89
diff changeset
    82
_LIT( KCaAttrJavaAppSettingsPluginValue,
hgs
parents: 89
diff changeset
    83
        "/resource/qt/plugins/appsettings/javaapplicationsettingsview.qtplugin");
hgs
parents: 89
diff changeset
    84
_LIT( KCaAttrAppWidgetUri, "widget:uri");
hgs
parents: 89
diff changeset
    85
_LIT( KCaAttrAppWidgetUriCWRTValue, "wrtwidgetuiplugin");
hgs
parents: 89
diff changeset
    86
_LIT( KCaAttrAppWidgetParamWebAppId, "widgetparam:webAppId");
hgs
parents: 89
diff changeset
    87
hgs
parents: 89
diff changeset
    88
_LIT( KCaAppGroupName, "appgroup_name" );
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    89
7feec50967db 201003_02
hgs
parents:
diff changeset
    90
const TInt KGranularityOne = 1;
7feec50967db 201003_02
hgs
parents:
diff changeset
    91
const TInt KUidChars = 10;
7feec50967db 201003_02
hgs
parents:
diff changeset
    92
const TInt KDefaultGranularity = 5;
7feec50967db 201003_02
hgs
parents:
diff changeset
    93
const TInt KDefaultExpandSize = 512;
7feec50967db 201003_02
hgs
parents:
diff changeset
    94
const TInt KCaMaxAttrLenght = 255;
7feec50967db 201003_02
hgs
parents:
diff changeset
    95
// MMC related constants
7feec50967db 201003_02
hgs
parents:
diff changeset
    96
_LIT( KCaAttrMmcId, "mmc_id" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    97
_LIT( KCaMassStorage, "mass_storage" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    98
_LIT( KCaMmcHistoryFname, "mmchistory" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    99
7feec50967db 201003_02
hgs
parents:
diff changeset
   100
//Ca constants
7feec50967db 201003_02
hgs
parents:
diff changeset
   101
// ---------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   102
7feec50967db 201003_02
hgs
parents:
diff changeset
   103
7feec50967db 201003_02
hgs
parents:
diff changeset
   104
// CONSTANTS
7feec50967db 201003_02
hgs
parents:
diff changeset
   105
    
7feec50967db 201003_02
hgs
parents:
diff changeset
   106
const TUid KSatUid =
7feec50967db 201003_02
hgs
parents:
diff changeset
   107
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   108
    0x101F4CE0
7feec50967db 201003_02
hgs
parents:
diff changeset
   109
    };
7feec50967db 201003_02
hgs
parents:
diff changeset
   110
87
hgs
parents: 86
diff changeset
   111
const TUid KHsAppUid =
hgs
parents: 86
diff changeset
   112
    {
hgs
parents: 86
diff changeset
   113
    0x20022F35
hgs
parents: 86
diff changeset
   114
    };
92
hgs
parents: 89
diff changeset
   115
hgs
parents: 89
diff changeset
   116
const TUid KMidletApplicationTypeUid = 
hgs
parents: 89
diff changeset
   117
    {
hgs
parents: 89
diff changeset
   118
    0x10210E26        
hgs
parents: 89
diff changeset
   119
    };
hgs
parents: 89
diff changeset
   120
hgs
parents: 89
diff changeset
   121
const TUid KCWRTApplicationTypeUid = 
hgs
parents: 89
diff changeset
   122
    {
hgs
parents: 89
diff changeset
   123
    0x200267DC       
hgs
parents: 89
diff changeset
   124
    };
hgs
parents: 89
diff changeset
   125
85
7feec50967db 201003_02
hgs
parents:
diff changeset
   126
const TInt KCenRepBufferSize = 255;
7feec50967db 201003_02
hgs
parents:
diff changeset
   127
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   128
// Attributes commonly used for all items.
7feec50967db 201003_02
hgs
parents:
diff changeset
   129
// These are the attributes that are normally used when displaying a menu of items
7feec50967db 201003_02
hgs
parents:
diff changeset
   130
// in a menu UI. To get a consistent look of various items, it is recommended that
7feec50967db 201003_02
hgs
parents:
diff changeset
   131
// some of these attributes are properly set (at least one of the xxx_name, and
7feec50967db 201003_02
hgs
parents:
diff changeset
   132
// some kind of icon information for non-applications).
7feec50967db 201003_02
hgs
parents:
diff changeset
   133
// Note, however, that none of these is guaranteed to be set, or be used by a menu UI.
7feec50967db 201003_02
hgs
parents:
diff changeset
   134
// Menu clients always need to check that the necessary attributes are present.
7feec50967db 201003_02
hgs
parents:
diff changeset
   135
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   136
_LIT( KCaAttrLongName, "long_name" ); ///< Long name.
7feec50967db 201003_02
hgs
parents:
diff changeset
   137
7feec50967db 201003_02
hgs
parents:
diff changeset
   138
// Built-in types and attributes.
7feec50967db 201003_02
hgs
parents:
diff changeset
   139
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   140
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   141
// Command strings.
7feec50967db 201003_02
hgs
parents:
diff changeset
   142
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   143
7feec50967db 201003_02
hgs
parents:
diff changeset
   144
_LIT8( KCaCmdOpen, "open" ); ///< Open item.
7feec50967db 201003_02
hgs
parents:
diff changeset
   145
_LIT8( KCaCmdRemove, "remove" ); ///< Remove item.
7feec50967db 201003_02
hgs
parents:
diff changeset
   146
_LIT8( KCaCmdClose, "close" ); ///< Close item.
7feec50967db 201003_02
hgs
parents:
diff changeset
   147
7feec50967db 201003_02
hgs
parents:
diff changeset
   148
7feec50967db 201003_02
hgs
parents:
diff changeset
   149
//Properties in database
7feec50967db 201003_02
hgs
parents:
diff changeset
   150
7feec50967db 201003_02
hgs
parents:
diff changeset
   151
_LIT( KCaDbPropVersion, "Version" ); /// db version
7feec50967db 201003_02
hgs
parents:
diff changeset
   152
_LIT( KCaDbPropLanguage, "Language" ); // language of ca strings in db
7feec50967db 201003_02
hgs
parents:
diff changeset
   153
_LIT( KCaDbPropQMfile, "QMfile" ); // prefix of qm file used in translation 
7feec50967db 201003_02
hgs
parents:
diff changeset
   154
7feec50967db 201003_02
hgs
parents:
diff changeset
   155
7feec50967db 201003_02
hgs
parents:
diff changeset
   156
7feec50967db 201003_02
hgs
parents:
diff changeset
   157
_LIT(KComma, ",");
7feec50967db 201003_02
hgs
parents:
diff changeset
   158
// Prefix hex format
7feec50967db 201003_02
hgs
parents:
diff changeset
   159
_LIT(KHexFormat, "0x%X");
7feec50967db 201003_02
hgs
parents:
diff changeset
   160
7feec50967db 201003_02
hgs
parents:
diff changeset
   161
#endif // CADEF_H