javaextensions/pim/common/inc/pimcommon.h
branchRCL_3
changeset 19 04becd199f91
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2008 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:  PIM API common types and constants
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef PIMCOMMON_H
       
    20 #define PIMCOMMON_H
       
    21 
       
    22 /** @file
       
    23  * This file contains common definitions and constants for the PIM API
       
    24  * implementation generated from the Java side.
       
    25  */
       
    26 
       
    27 #include "pimtypes.h"
       
    28 
       
    29 /**
       
    30  * Field data type constants.
       
    31  * EPIMFieldInvalid added for native side implementation.
       
    32  * [From javax.microedition.pim.PIMItem]
       
    33  */
       
    34 enum TPIMFieldDataType
       
    35 {
       
    36     EPIMFieldInvalid = -1,
       
    37     EPIMFieldBinary = 0,
       
    38     EPIMFieldBoolean = 1,
       
    39     EPIMFieldDate = 2,
       
    40     EPIMFieldInt = 3,
       
    41     EPIMFieldString = 4,
       
    42     EPIMFieldStringArray = 5
       
    43 };
       
    44 
       
    45 enum TPIMItemSelect
       
    46 {
       
    47     EPIMItemAll,
       
    48     EPIMItemMatchingItem,
       
    49     EPIMItemMatchingString,
       
    50     EPIMItemMatchingCategory,
       
    51     EPIMItemCorrupt
       
    52 };
       
    53 
       
    54 /**
       
    55  * Field constant and type compound.
       
    56  */
       
    57 struct TPIMFieldAndType
       
    58 {
       
    59 public:
       
    60 
       
    61     TPIMFieldAndType() :
       
    62             iField(0), iType(EPIMFieldInvalid)
       
    63     {
       
    64     }
       
    65 
       
    66     TPIMFieldAndType(TPIMField aField, TPIMFieldDataType aType) :
       
    67             iField(aField), iType(aType)
       
    68     {
       
    69     }
       
    70 
       
    71     TPIMField iField;
       
    72     TPIMFieldDataType iType;
       
    73 };
       
    74 
       
    75 /**
       
    76  * Attribute constant indicating "no attributes".
       
    77  * [From javax.microedition.pim.PIMItem]
       
    78  */
       
    79 const TPIMAttribute KPIMAttrNone = 0;
       
    80 
       
    81 /**
       
    82  * Extended field minimum value.
       
    83  * [From javax.microedition.pim.PIMItem]
       
    84  */
       
    85 const TPIMField KPIMExtendedFieldMinValue = 16777216;
       
    86 
       
    87 /**
       
    88  * Extended attribute minimum value.
       
    89  * [From javax.microedition.pim.PIMItem]
       
    90  */
       
    91 const TPIMField KPIMExtendedAttributeMinValue = 16777216;
       
    92 
       
    93 /**
       
    94  * PIMException reason codes.
       
    95  * [From javax.microedition.pim.PIMException]
       
    96  */
       
    97 enum TPIMExceptionReasonCode
       
    98 {
       
    99     EPIMFeatureNotSupported = 0,
       
   100     EPIMGeneralError = 1,
       
   101     EPIMListClosed = 2,
       
   102     EPIMListNotAccessible = 3,
       
   103     EPIMMaxCategoriesExceeded = 4,
       
   104     EPIMUnsupportedVersion = 5,
       
   105     EPIMUpdateError = 6
       
   106 };
       
   107 
       
   108 /**
       
   109  * PIM list types.
       
   110  * [From javax.microedition.pim.PIM]
       
   111  */
       
   112 enum TPIMListType
       
   113 {
       
   114     EPIMContactList = 1,
       
   115     EPIMEventList = 2,
       
   116     EPIMToDoList = 3
       
   117 };
       
   118 
       
   119 /**
       
   120  * PIM list modes.
       
   121  * [From javax.microedition.pim.PIM]
       
   122  */
       
   123 enum TPIMListMode
       
   124 {
       
   125     EPIMReadOnly = 1,
       
   126     EPIMWriteOnly = 2,
       
   127     EPIMReadWrite = 3
       
   128 };
       
   129 
       
   130 /**
       
   131  * MIDlet security domains. Corresponding values from
       
   132  * the Java-side are found from PIMManager
       
   133  */
       
   134 enum TPIMSecurityDomain
       
   135 {
       
   136     EPIMSecurityDomainUntrusted = 0,
       
   137     EPIMSecurityDomainTTP = 1,
       
   138     EPIMSecurityDomainOperator = 2,
       
   139     EPIMSecurityDomainManufacturer = 3
       
   140 };
       
   141 
       
   142 #endif // PIMCOMMON_H