1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/vpnapidefs.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,111 @@
1.4 +/*
1.5 +* Copyright (c) 2003-2006 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: VPN API definitions.
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +/**
1.23 + @file
1.24 + @released
1.25 + @publishedPartner
1.26 +
1.27 + VPN API definitions
1.28 + */
1.29 +
1.30 +#ifndef __VPNAPIDEFS_H__
1.31 +#define __VPNAPIDEFS_H__
1.32 +
1.33 +// VPN API error codes
1.34 +// NOTE! The error code values below MUST be kept in sync with
1.35 +// the corresponding error code values defined together by
1.36 +// vpnapi/data/vpnerr.rss and vpnapi/data/vpnerr.ra
1.37 +const TInt KVpnErrNoPolicyFile = -5229;
1.38 +const TInt KVpnErrNoPolicyInfoFile = -5230;
1.39 +const TInt KVpnErrInvalidPolicyFile = -5231;
1.40 +const TInt KVpnErrPolicyNotFound = -5232;
1.41 +const TInt KVpnErrInvalidCaCertFile = -5233;
1.42 +const TInt KVpnErrPeerCertFileMissing = -5234;
1.43 +const TInt KVpnErrInvalidUserCertFile = -5235;
1.44 +const TInt KVpnErrInvalidUserPrivKeyFile = -5236;
1.45 +const TInt KVpnErrImportOngoing = -5237;
1.46 +const TInt KVpnErrPwdChangeOngoing = -5238;
1.47 +const TInt KVpnErrPolicyCountChanged = -5239;
1.48 +const TInt KVpnErrPolicySizeChanged = -5239;
1.49 +
1.50 +// Deprecated error code definitions
1.51 +const TInt KVpnErrCaCertFileMissing = -5233;
1.52 +const TInt KVpnErrUserCertFileMissing = -5235;
1.53 +const TInt KVpnErrUserPrivKeyFileMissing = -5236;
1.54 +
1.55 +// Other constants
1.56 +const TInt KMaxIdLength = 50;
1.57 +const TInt KMaxNameLength = 128;
1.58 +const TInt KMaxVersionLength = 16;
1.59 +const TInt KMaxDescriptionLength = 256;
1.60 +
1.61 +// Type definitions
1.62 +typedef TBuf<KMaxIdLength> TVpnPolicyId;
1.63 +typedef TBuf8<KMaxIdLength> TVpnPolicyId8;
1.64 +
1.65 +typedef TBuf<KMaxNameLength> TVpnPolicyName;
1.66 +
1.67 +/**
1.68 + * Policy usage status
1.69 + */
1.70 +enum TPolicyUsageStatus
1.71 + {
1.72 + EUsageStatusUnknown = 1, ///< For some reason, the usage status could not be found out
1.73 + EUsageStatusUnused, ///< The policy is neither assigned to any IAP nor active
1.74 + EUsageStatusAssignedToIap, ///< The policy is assigned to one or more IAPs but is not currently active
1.75 + EUsageStatusActive, ///< The policy is assigned to one or more IAPs and is currently active
1.76 + };
1.77 +
1.78 +/**
1.79 + * Policy PKI status
1.80 + */
1.81 +enum TPolicyPkiStatus
1.82 + {
1.83 + EPkiStatusUnknown = 1, ///< For some reason, the PKI status could not be found out
1.84 + EPkiStatusReady, ///< The PKI information is present
1.85 + EPkiStatusNoCert, ///< At least one of the required certificates is missing
1.86 + EPkiStatusCertExpired, ///< At least one of the required certificates has expired
1.87 + EPkiStatusCertNotValidYet, ///< At least one of the required certificates is not yet valid
1.88 + };
1.89 +
1.90 +/**
1.91 + * A compact policy information structure
1.92 + */
1.93 +struct TVpnPolicyInfo
1.94 + {
1.95 + TVpnPolicyId iId; ///< Policy ID
1.96 + TVpnPolicyName iName; ///< Policy name
1.97 + };
1.98 +
1.99 +/**
1.100 + * A more detailed policy information structure
1.101 + */
1.102 +struct TVpnPolicyDetails : public TVpnPolicyInfo
1.103 + {
1.104 + TBuf<KMaxDescriptionLength> iDescription; ///< A short description of the policy
1.105 + TBuf<KMaxVersionLength> iVersion; ///< The version number of the policy
1.106 + TBuf<KMaxNameLength> iIssuerName; ///< The name of the organization or person who created the policy
1.107 + TBuf<KMaxNameLength> iContactInfo; ///< The phone number, email address, URL or other kind of issuer contact information
1.108 + TPolicyUsageStatus iUsageStatus; ///< Policy usage status
1.109 + TPolicyPkiStatus iPkiStatus; ///< Policy usage status
1.110 + };
1.111 +
1.112 +_LIT(KHiddenPolicyIndicator, "<<HIDDEN>>");
1.113 +
1.114 +#endif