commsfwtools/preparedefaultcommsdatabase/inc/commsdat_partner.h
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Constants for use in storing comms data via CommsDat
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @publishedPartner
       
    21  @released
       
    22 */
       
    23 
       
    24 #if (!defined COMMSDAT_PARTNER_H)
       
    25 #define       COMMSDAT_PARTNER_H
       
    26 
       
    27 #include <e32property.h>
       
    28 #include <commsdat.h>
       
    29 
       
    30 namespace Meta
       
    31     {
       
    32 /**
       
    33 @publishedPartner
       
    34 @released
       
    35 */
       
    36     IMPORT_C MMetaType* TMDBNumVisitorFactoryL(const TAny* mem, const TAny* data);
       
    37 /**
       
    38 @publishedPartner
       
    39 @released
       
    40 */
       
    41     IMPORT_C MMetaType* TMDBLinkNumVisitorFactoryL(const TAny* mem, const TAny* data);
       
    42 /**
       
    43 @publishedPartner
       
    44 @released
       
    45 */
       
    46     IMPORT_C MMetaType* TMDBTextVisitorFactoryL(const TAny* mem, const TAny* data);
       
    47 /**
       
    48 @publishedPartner
       
    49 @released
       
    50 */
       
    51     IMPORT_C MMetaType* TMDBMedTextVisitorFactoryL(const TAny* mem, const TAny* data);
       
    52 /**
       
    53 @publishedPartner
       
    54 @released
       
    55 */
       
    56     IMPORT_C MMetaType* TMDBLongTextVisitorFactoryL(const TAny* mem, const TAny* data);
       
    57 /**
       
    58 @publishedPartner
       
    59 @released
       
    60 */
       
    61     IMPORT_C MMetaType* TMDBBinVisitorFactoryL(const TAny* mem, const TAny* data);
       
    62 /**
       
    63 @publishedPartner
       
    64 @released
       
    65 */
       
    66     IMPORT_C MMetaType* TMDBLinkVisitorFactoryL(const TAny* mem, const TAny* data);
       
    67 /**
       
    68 @publishedPartner
       
    69 @released
       
    70 */
       
    71     IMPORT_C MMetaType* TMDBRecordSetVisitorFactoryL(const TAny* mem, const TAny* data);
       
    72 /**
       
    73 @publishedPartner
       
    74 @released
       
    75 */
       
    76     IMPORT_C MMetaType* TMDBGenericRecordVisitorFactoryL(const TAny* mem, const TAny* data);
       
    77 
       
    78     }
       
    79 
       
    80 
       
    81 namespace CommsDat
       
    82 {
       
    83 /**
       
    84 @publishedPartner
       
    85 @released
       
    86 */
       
    87 const TInt KMaxTextLength		= 50; 		//< Specifies the max length (characters) for short text.
       
    88 /**
       
    89 @publishedPartner
       
    90 @released
       
    91 */
       
    92 const TInt KMaxMedTextLength	= 255; 		//< Specifies the max length (characters) for medium text.
       
    93 /**
       
    94 @publishedPartner
       
    95 @released
       
    96 */
       
    97 const TInt KMaxLongTextLength	= 1024;		//< Specifies the max length (characters) for long text.
       
    98 /**
       
    99 @publishedPartner
       
   100 @released
       
   101 */
       
   102 const TInt KMaxNumLength		= 1;		//< Specifies the max length for an integer and a boolean.
       
   103 
       
   104 // Length override on a normal text field
       
   105 /**
       
   106 @publishedPartner
       
   107 @released
       
   108 */
       
   109 const TInt KShortTextLength		= 32;
       
   110 
       
   111 /**
       
   112 Mask for all attribute settings that apply to read and write operations
       
   113 see TCDAttributeFlags
       
   114 
       
   115   ECDNoWriteButDelete = 0x0000010                             
       
   116   ECDHidden           = 0x0000020
       
   117   ECDPrivate          = 0x0000040
       
   118   ECDProtectedWrite   = 0x0000080
       
   119   
       
   120 @publishedPartner
       
   121 @released
       
   122 */
       
   123 #define KCDMaskShowReadWriteAttributes  (ECDNoWriteButDelete |ECDHidden | ECDPrivate | ECDProtectedWrite)
       
   124 
       
   125 /**
       
   126 Mask for all attribute settings that apply to read operations
       
   127 see TCDAttributeFlags
       
   128 
       
   129   ECDHidden           = 0x0000020
       
   130   ECDPrivate          = 0x0000040
       
   131 
       
   132 @publishedPartner
       
   133 @released
       
   134 */
       
   135 #define KCDMaskShowReadAttributes       (ECDHidden| ECDPrivate)     
       
   136 
       
   137 /**
       
   138 Combine with table id to give the location of table type info
       
   139 
       
   140 @publishedPartner
       
   141 @released
       
   142 */
       
   143 #define KCDTableTypeInfo            0x007fff00
       
   144 
       
   145 /*
       
   146 Combine with table id to give location of record type info
       
   147 */
       
   148 //#define KCDRecordTypeInfo			0x007f0000
       
   149 
       
   150 
       
   151 /**
       
   152 Use to request allocation of a new table id.
       
   153 Should only be called when creating a new user-defined table
       
   154 
       
   155 @publishedPartner
       
   156 @released
       
   157 */
       
   158 #define KCDNewTableRequest           KCDMaskGenericTableName
       
   159 
       
   160 
       
   161 /**
       
   162 Combine with table id to give request for a new column in a table.
       
   163 The table must already exist.  New columns should only normally be 
       
   164 requested when creating a new user-defined table
       
   165 
       
   166 @publishedPartner
       
   167 @released
       
   168 */
       
   169 #define KCDNewColumnRequest			0x0000ff01
       
   170 
       
   171 
       
   172 /**
       
   173 @publishedPartner
       
   174 @released
       
   175 */
       
   176 #define KCDMaxRecordId     0x0000ff00
       
   177 /**
       
   178 @publishedPartner
       
   179 @released
       
   180 */
       
   181 #define KCDMaxColumnId     0x007f0000
       
   182 /**
       
   183 @publishedPartner
       
   184 @released
       
   185 */
       
   186 #define KCDMaxTableId      0x7f800000
       
   187 
       
   188 
       
   189 /** UIDs for CommDB event notification */
       
   190 
       
   191 /**
       
   192 @publishedPartner
       
   193 @released
       
   194 */
       
   195 const TUid KUidCommDbNotificationEvent = {0x1020762E};
       
   196 /**
       
   197 @publishedPartner
       
   198 @released
       
   199 */
       
   200 const TUid KUidCommsDatStatusEvent = {KUidSystemCategoryValue};
       
   201 /**
       
   202 @publishedPartner
       
   203 @released
       
   204 */
       
   205 const TInt KCommsDatStatusEventCommitSeq = 0x1020762F;
       
   206 
       
   207 /**
       
   208 @publishedPartner
       
   209 @released
       
   210 */
       
   211 #define END_ATTRIBUTE_TABLE_BASE_N( baseMetaClass, baseId, entry ) \
       
   212  { (TInt)((TAny*)(baseMetaClass::GetVDataTableStatic() + entry)), NULL }};
       
   213 
       
   214 } // namespace CommsDat
       
   215 
       
   216 #endif //COMMSDAT_PARTNER_H
       
   217