contentstorage/inc/cadef.h
author hgs
Fri, 14 May 2010 17:24:44 +0300
changeset 94 dbb8300717f7
parent 93 82b66994846c
child 96 5d243a69bdda
permissions -rw-r--r--
201019
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
94
hgs
parents: 93
diff changeset
    15
 *  Version     : %version: 10.1.16 % << 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
93
hgs
parents: 92
diff changeset
    27
_LIT( KCaDbVersion, "00001" );
89
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
    };
93
hgs
parents: 92
diff changeset
    59
hgs
parents: 92
diff changeset
    60
enum TItemAppearance
hgs
parents: 92
diff changeset
    61
    {
hgs
parents: 92
diff changeset
    62
    EItemAppearanceNotChanged,
hgs
parents: 92
diff changeset
    63
    EItemDisappeared,
hgs
parents: 92
diff changeset
    64
    EItemAppeared
hgs
parents: 92
diff changeset
    65
    };
hgs
parents: 92
diff changeset
    66
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    67
// Ca - Application
92
hgs
parents: 89
diff changeset
    68
hgs
parents: 89
diff changeset
    69
_LIT( KCaTypeMenuCollections, "menucollections" );
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    70
_LIT( KCaTypeFolder, "folder" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    71
_LIT( KCaTypeCollection, "collection" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    72
_LIT( KCaTypeApp, "application" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    73
_LIT( KCaTypeWidget, "widget" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    74
_LIT( KCaTypeUrl, "url" );
92
hgs
parents: 89
diff changeset
    75
_LIT( KCaTypePackage, "package" );
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    76
_LIT( KCaAttrView, "view" ); ///< View.
7feec50967db 201003_02
hgs
parents:
diff changeset
    77
_LIT( KCaAttrUrl, "url" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    78
_LIT( KCaAttrWindowGroupId, "window_group_id" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    79
_LIT( KCaTypeCollectionDownload, "collection::downloaded" );
7feec50967db 201003_02
hgs
parents:
diff changeset
    80
_LIT( KCaPackageUid,"packageuid");
87
hgs
parents: 86
diff changeset
    81
_LIT( KCaAttrInstallationTime, "installationTime");
88
hgs
parents: 87
diff changeset
    82
_LIT( KCaTypeTemplatedApp, "templatedApplication" );
92
hgs
parents: 89
diff changeset
    83
_LIT( KCaAttrAppType, "apptype");
hgs
parents: 89
diff changeset
    84
_LIT( KCaAttrAppTypeValueJava, "java");
hgs
parents: 89
diff changeset
    85
_LIT( KCaAttrAppTypeValueCWRT, "cwrt");
hgs
parents: 89
diff changeset
    86
_LIT( KCaAttrAppTypeValueNative, "native");
hgs
parents: 89
diff changeset
    87
_LIT( KCaAttrComponentId, "component_id" );
hgs
parents: 89
diff changeset
    88
_LIT( KCaAttrAppSettingsPlugin, "app_settings_plugin");
hgs
parents: 89
diff changeset
    89
// app settings plugin for java apps
hgs
parents: 89
diff changeset
    90
_LIT( KCaAttrJavaAppSettingsPluginValue,
hgs
parents: 89
diff changeset
    91
        "/resource/qt/plugins/appsettings/javaapplicationsettingsview.qtplugin");
hgs
parents: 89
diff changeset
    92
_LIT( KCaAttrAppWidgetUri, "widget:uri");
93
hgs
parents: 92
diff changeset
    93
_LIT( KCaAttrAppWidgetServiceXml, "widget:servicexml");
hgs
parents: 92
diff changeset
    94
92
hgs
parents: 89
diff changeset
    95
_LIT( KCaAttrAppWidgetUriCWRTValue, "wrtwidgetuiplugin");
hgs
parents: 89
diff changeset
    96
_LIT( KCaAttrAppWidgetParamWebAppId, "widgetparam:webAppId");
hgs
parents: 89
diff changeset
    97
hgs
parents: 89
diff changeset
    98
_LIT( KCaAppGroupName, "appgroup_name" );
85
7feec50967db 201003_02
hgs
parents:
diff changeset
    99
94
hgs
parents: 93
diff changeset
   100
_LIT( KCollectionIconFileName, "qtg_large_applications_user");
hgs
parents: 93
diff changeset
   101
85
7feec50967db 201003_02
hgs
parents:
diff changeset
   102
const TInt KGranularityOne = 1;
7feec50967db 201003_02
hgs
parents:
diff changeset
   103
const TInt KUidChars = 10;
7feec50967db 201003_02
hgs
parents:
diff changeset
   104
const TInt KDefaultGranularity = 5;
7feec50967db 201003_02
hgs
parents:
diff changeset
   105
const TInt KDefaultExpandSize = 512;
7feec50967db 201003_02
hgs
parents:
diff changeset
   106
const TInt KCaMaxAttrLenght = 255;
7feec50967db 201003_02
hgs
parents:
diff changeset
   107
// MMC related constants
7feec50967db 201003_02
hgs
parents:
diff changeset
   108
_LIT( KCaAttrMmcId, "mmc_id" );
7feec50967db 201003_02
hgs
parents:
diff changeset
   109
_LIT( KCaMassStorage, "mass_storage" );
7feec50967db 201003_02
hgs
parents:
diff changeset
   110
_LIT( KCaMmcHistoryFname, "mmchistory" );
93
hgs
parents: 92
diff changeset
   111
// max(KCaMassStorage.Length(), KUidChars)
hgs
parents: 92
diff changeset
   112
const TInt KMassStorageIdLength = 12;
85
7feec50967db 201003_02
hgs
parents:
diff changeset
   113
7feec50967db 201003_02
hgs
parents:
diff changeset
   114
//Ca constants
7feec50967db 201003_02
hgs
parents:
diff changeset
   115
// ---------------------------------------------------------
7feec50967db 201003_02
hgs
parents:
diff changeset
   116
7feec50967db 201003_02
hgs
parents:
diff changeset
   117
7feec50967db 201003_02
hgs
parents:
diff changeset
   118
// CONSTANTS
93
hgs
parents: 92
diff changeset
   119
85
7feec50967db 201003_02
hgs
parents:
diff changeset
   120
const TUid KSatUid =
7feec50967db 201003_02
hgs
parents:
diff changeset
   121
    {
7feec50967db 201003_02
hgs
parents:
diff changeset
   122
    0x101F4CE0
7feec50967db 201003_02
hgs
parents:
diff changeset
   123
    };
7feec50967db 201003_02
hgs
parents:
diff changeset
   124
87
hgs
parents: 86
diff changeset
   125
const TUid KHsAppUid =
hgs
parents: 86
diff changeset
   126
    {
hgs
parents: 86
diff changeset
   127
    0x20022F35
hgs
parents: 86
diff changeset
   128
    };
92
hgs
parents: 89
diff changeset
   129
93
hgs
parents: 92
diff changeset
   130
const TUid KMidletApplicationTypeUid =
92
hgs
parents: 89
diff changeset
   131
    {
93
hgs
parents: 92
diff changeset
   132
    0x10210E26
92
hgs
parents: 89
diff changeset
   133
    };
hgs
parents: 89
diff changeset
   134
93
hgs
parents: 92
diff changeset
   135
const TUid KCWRTApplicationTypeUid =
92
hgs
parents: 89
diff changeset
   136
    {
93
hgs
parents: 92
diff changeset
   137
    0x200267DC
92
hgs
parents: 89
diff changeset
   138
    };
hgs
parents: 89
diff changeset
   139
85
7feec50967db 201003_02
hgs
parents:
diff changeset
   140
const TInt KCenRepBufferSize = 255;
7feec50967db 201003_02
hgs
parents:
diff changeset
   141
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   142
// Attributes commonly used for all items.
7feec50967db 201003_02
hgs
parents:
diff changeset
   143
// These are the attributes that are normally used when displaying a menu of items
7feec50967db 201003_02
hgs
parents:
diff changeset
   144
// in a menu UI. To get a consistent look of various items, it is recommended that
7feec50967db 201003_02
hgs
parents:
diff changeset
   145
// some of these attributes are properly set (at least one of the xxx_name, and
7feec50967db 201003_02
hgs
parents:
diff changeset
   146
// some kind of icon information for non-applications).
7feec50967db 201003_02
hgs
parents:
diff changeset
   147
// 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
   148
// Menu clients always need to check that the necessary attributes are present.
7feec50967db 201003_02
hgs
parents:
diff changeset
   149
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   150
_LIT( KCaAttrLongName, "long_name" ); ///< Long name.
94
hgs
parents: 93
diff changeset
   151
_LIT( KCaComponentId, "component_id" ); ///< Long name.
85
7feec50967db 201003_02
hgs
parents:
diff changeset
   152
7feec50967db 201003_02
hgs
parents:
diff changeset
   153
// Built-in types and attributes.
7feec50967db 201003_02
hgs
parents:
diff changeset
   154
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   155
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   156
// Command strings.
7feec50967db 201003_02
hgs
parents:
diff changeset
   157
//
7feec50967db 201003_02
hgs
parents:
diff changeset
   158
7feec50967db 201003_02
hgs
parents:
diff changeset
   159
_LIT8( KCaCmdOpen, "open" ); ///< Open item.
7feec50967db 201003_02
hgs
parents:
diff changeset
   160
_LIT8( KCaCmdRemove, "remove" ); ///< Remove item.
7feec50967db 201003_02
hgs
parents:
diff changeset
   161
_LIT8( KCaCmdClose, "close" ); ///< Close item.
7feec50967db 201003_02
hgs
parents:
diff changeset
   162
7feec50967db 201003_02
hgs
parents:
diff changeset
   163
7feec50967db 201003_02
hgs
parents:
diff changeset
   164
//Properties in database
7feec50967db 201003_02
hgs
parents:
diff changeset
   165
7feec50967db 201003_02
hgs
parents:
diff changeset
   166
_LIT( KCaDbPropVersion, "Version" ); /// db version
7feec50967db 201003_02
hgs
parents:
diff changeset
   167
_LIT( KCaDbPropLanguage, "Language" ); // language of ca strings in db
93
hgs
parents: 92
diff changeset
   168
_LIT( KCaDbPropQMfile, "QMfile" ); // prefix of qm file used in translation
85
7feec50967db 201003_02
hgs
parents:
diff changeset
   169
7feec50967db 201003_02
hgs
parents:
diff changeset
   170
7feec50967db 201003_02
hgs
parents:
diff changeset
   171
7feec50967db 201003_02
hgs
parents:
diff changeset
   172
_LIT(KComma, ",");
7feec50967db 201003_02
hgs
parents:
diff changeset
   173
// Prefix hex format
7feec50967db 201003_02
hgs
parents:
diff changeset
   174
_LIT(KHexFormat, "0x%X");
7feec50967db 201003_02
hgs
parents:
diff changeset
   175
7feec50967db 201003_02
hgs
parents:
diff changeset
   176
#endif // CADEF_H