contacts_plat/predictivesearch_utils_api/inc/CPcsDefs.h
changeset 0 e686773b3f54
child 15 e8e3147d53eb
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2007 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:  PCS general definitions 
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __PCSSERVERDEFS_H__
       
    19 #define __PCSSERVERDEFS_H__
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <BidiText.h>
       
    23 
       
    24 /**
       
    25  * PCS Server Exe Name
       
    26  */
       
    27 _LIT(KPcsServerName,           "PcsServer");
       
    28 _LIT(KPcsServerExeName,        "PcsServer.exe");
       
    29 _LIT(KPcsAlgorithm_NonChinese, "PCS-ALG-1");
       
    30 _LIT(KPcsAlgorithm_Chinese,    "PCS-ALG-2");
       
    31 
       
    32 /**
       
    33  * PCS Server Version details
       
    34  */
       
    35 const TInt KPcsServerMajorVersionNumber = 1;
       
    36 const TInt KPcsServerMinorVersionNumber = 0;
       
    37 const TInt KPcsServerBuildVersionNumber = 0;
       
    38 
       
    39 /**
       
    40  * PCS Server request Commands
       
    41  */
       
    42 enum TPsServerRequestCommands
       
    43 { 
       
    44     ESearchSettings,
       
    45     ESearch,
       
    46     ESearchInput,
       
    47     ECancelSearch,
       
    48     ELangSupport,
       
    49     EGetDataOrder,
       
    50     EGetSortOrder,
       
    51     ESetSortOrder,
       
    52     EShutdown,
       
    53     ESearchMatchString
       
    54 };
       
    55 
       
    56 /**
       
    57  * PS Server response commands
       
    58  */
       
    59 enum TPsServerResponseCommand
       
    60 {
       
    61 	ESearchComplete,
       
    62 	ECancelComplete
       
    63 };
       
    64 
       
    65 /**
       
    66  * PS Keyboard Modes
       
    67  */
       
    68 enum TKeyboardModes
       
    69 {
       
    70    EItut,
       
    71    EQwerty,
       
    72    EModeUndefined
       
    73 };
       
    74 
       
    75 /**
       
    76  * Different states of Caching
       
    77  */
       
    78 enum TCachingStatus
       
    79 {
       
    80 	ECachingNotStarted         =  0,
       
    81 	ECachingInProgress         = 10,
       
    82 	ECachingComplete           = 20,
       
    83 	ECachingCompleteWithErrors = 30
       
    84 };
       
    85 
       
    86 /**
       
    87  * Different sort types
       
    88  */
       
    89 enum TSortType
       
    90 {
       
    91 	EPatternBased,
       
    92 	EAlphabetical
       
    93 };
       
    94 
       
    95 /**
       
    96  * PCS Plugin Interface UID
       
    97  */
       
    98 const TUid KPcsPluginInterfaceUid   = { 0x2000B5BD };
       
    99 const TUid KPcsAlgorithm1           = { 0x2000B5BE };
       
   100 const TUid KPsDataStoreInterfaceUid = { 0x2000B5C0 };
       
   101 
       
   102 const TInt KLinksToFetchInOneGo = 500;
       
   103 
       
   104 /**
       
   105  * Max number of supported languages for Key Map
       
   106  */
       
   107 const TInt KMaxNbrOfLangKeymapping = 10;
       
   108 
       
   109 /**
       
   110  * Central Repository constants
       
   111  */
       
   112 const TInt KCRMaxLen = 255;
       
   113 const TInt KPsQueryMaxLen = 50;
       
   114 const TInt KBufferMaxLen = 255;
       
   115 const TInt KSearchResultsBufferLen = 8192;
       
   116 
       
   117 /**
       
   118  * Data Stores Constants 
       
   119  */
       
   120 _LIT(KVPbkDefaultCntDbURI, "cntdb://c:contacts.cdb"); //Phone Store
       
   121 _LIT(KVPbkSimGlobalAdnURI, "sim://global_adn");       // SIM ADN Store
       
   122 _LIT(KVPbkSimGlobalFdnURI, "sim://global_fdn");       // SIM FDN Store
       
   123 _LIT(KVPbkSimGlobalSdnURI, "sim://global_sdn");       // SIM SDN Store
       
   124 _LIT(KVPbkDefaultGrpDbURI, "cntdb://c:contacts.gdb"); // groups Store
       
   125 
       
   126 /**
       
   127  * Data Structure to identify the matched locations
       
   128  */
       
   129 struct TPsMatchLocation
       
   130 {
       
   131 	public:
       
   132 		TInt index;   						  // starting index for the match sequence
       
   133 		TInt length;  						  // lenght of the match sequence
       
   134 		TBidiText::TDirectionality direction; // directionality for the sequence
       
   135 };
       
   136 
       
   137 /**
       
   138  * Character constants
       
   139  */
       
   140 const TInt KUnitSeparator  = 31;
       
   141 const TInt KSpaceCharacter = 32;
       
   142 
       
   143 #endif // __PCSSERVERDEFS_H__
       
   144 
       
   145 // End of file