omadm/omadmappui/inc/NSmlDMdef.h
changeset 0 3ce708148e4d
child 8 0a8136f75056
equal deleted inserted replaced
-1:000000000000 0:3ce708148e4d
       
     1 /*
       
     2 * Copyright (c) 2005 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:  Application definitions.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NSMLDMDEF_H
       
    20 #define NSMLDMDEF_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include "NSmlDMUIDefines.h"
       
    24 #include "NSmlDMSyncUi.hrh"
       
    25 
       
    26 #define KNSmlMaxURLLength 150
       
    27 #define KNSmlDmServerIdMaxLength 150
       
    28 #define KNSmlMaxItemLength 150	// The item max length.
       
    29 
       
    30 
       
    31 const TInt KNSmlDefaultGranularity = 1;
       
    32 
       
    33 const TInt KBufSize16   = 16;
       
    34 const TInt KBufSize     = 128;
       
    35 const TInt KBufSize255  = 255;
       
    36 const TInt KBufSize256  = 256;
       
    37 const TInt KBufSize32   = 32;
       
    38 const TInt KPortMaxSize = 65535;
       
    39 const TInt KPortMinSize = 1;
       
    40 // View UID:s
       
    41 const TUid KNSmlDMFotaViewId        = { ENSmlFotaViewTab     };
       
    42 const TUid KNSmlDMProfilesViewId    = { ENSmlProfilesViewTab };
       
    43 
       
    44 const TInt KDefaultHttpPort     = 80;
       
    45 const TInt KDefaultHttpsPort    = 443;
       
    46  // setting dialog listbox update delay after db event
       
    47 const TInt KListBoxUpdateDelay  = 250;
       
    48 const TInt KHttpUsed  = 1;
       
    49 const TInt KHttpNotUsed  = 0;
       
    50 const TInt KNumberofCharacters  = 4;
       
    51 const TInt KMultiplier  = 1000000;
       
    52 
       
    53 //errors
       
    54 const TInt KDMErr					= -8144;
       
    55 
       
    56 // Medium type definitions
       
    57 const TUid KUidNSmlMediumTypeInternet  = { 0x101F99F0 };
       
    58 const TUid KUidNSmlMediumTypeBluetooth = { 0x101F99F1 };
       
    59 const TUid KUidNSmlMediumTypeUSB       = { 0x101F99F2 };
       
    60 const TUid KUidNSmlMediumTypeIrDA      = { 0x101F99F3 };
       
    61 
       
    62 _LIT( KNSmlHttp,    "http" );
       
    63 _LIT( KNSmlHttps,   "https" );
       
    64 _LIT( KHttpHeader,  "http://" );
       
    65 _LIT( KHttpsHeader, "https://" );
       
    66 _LIT( KColon,       ":" );
       
    67 _LIT( KHttpSep,     "://" );
       
    68 _LIT( KSlash,       "/" );
       
    69 _LIT( KSmlEOL,      "\n" );
       
    70 _LIT( KNSmlTab,     "\t" );
       
    71 
       
    72 _LIT( KZDrive, "z:" );
       
    73 
       
    74 #ifdef __SCALABLE_ICONS
       
    75     _LIT( KDMAppIconFileName, "nsmldmsync.mif" );
       
    76 #else // !__SCALABLE_ICONS
       
    77     _LIT( KDMAppIconFileName, "nsmldmsync.mbm" );
       
    78 #endif
       
    79 
       
    80 //
       
    81 // NOTE: this enum must match to resource r_sml_bearer_type
       
    82 //
       
    83 enum TNSmlSyncBearerType
       
    84 	{
       
    85 	EAspBearerInternet = 0,
       
    86 	EAspBearerBlueTooth = 1,
       
    87 	EAspBearerUsb = 2,
       
    88 	EAspBearerIrda = 3,
       
    89     EAspBearerLast = 4
       
    90 	};
       
    91 
       
    92 // NOTE: this enum must match with property array described in 
       
    93 // SyncML_Sync_Agent_Client_API_Specification.doc.
       
    94 enum TNSmlSyncTransportProperties
       
    95 	{
       
    96 	EPropertyIntenetAccessPoint = 0,
       
    97 	EPropertyHttpUsed = 5,
       
    98 	EPropertyHttpUserName = 6,
       
    99 	EPropertyHttpPassword = 7
       
   100 	};
       
   101 
       
   102 enum TNSmlSyncState
       
   103 	{
       
   104 	ESASyncStateEnable,
       
   105 	ESASyncStateDisable,
       
   106 	ESASyncStateConfirm
       
   107 	};
       
   108 
       
   109 enum TNSmlSyncInitiation    
       
   110 	{		
       
   111 	EClientInitiated = 1,
       
   112 	EServerAlerted
       
   113 	};
       
   114 
       
   115 enum TNSmlEditMode
       
   116 	{ 
       
   117 	ESmlNewProfile = 0,
       
   118 	ESmlEditProfile,
       
   119 	ESmlCopyProfile
       
   120 	};
       
   121 
       
   122 enum TNSmlProfileMediumType
       
   123 	{
       
   124 	EProfileInternet = 0,
       
   125 	EProfileObexBlueTooth = 1
       
   126 	};
       
   127 
       
   128 enum TNSmlMandatoryProfileData
       
   129 	{
       
   130 	EMandatoryOk,
       
   131 	EMandatoryNoProfileName,
       
   132     EMandatoryNoHostAddress,
       
   133     EMandatoryNoContent,
       
   134 	EMandatoryNoLocalDatabase,
       
   135 	EMandatoryNoRemoteDatabase,
       
   136 	EMandatoryNoSyncType
       
   137 	};
       
   138 
       
   139 enum TNSmlStatus
       
   140 	{
       
   141 	ENSmlSyncComplete,
       
   142 	ENSmlRefreshMainView
       
   143 	};
       
   144 
       
   145 enum TNSmlAccessPointSelection
       
   146 	{
       
   147 	ENsmlAlwaysAsk,
       
   148 	ENsmlDefaultConnection,
       
   149 	ENsmlIap
       
   150 	};	
       
   151 
       
   152 //Constants used when update happen NSC/DM 
       
   153 enum {
       
   154 		EFotaUpdateNSC=1,
       
   155 		EFotaUpdateNSCBg,
       
   156 		EFotaUpdateDM
       
   157 };
       
   158 
       
   159 
       
   160 #endif // NSMLDMDEF_H
       
   161 
       
   162 // End of file