2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Mount configuration entry
19 #ifndef CRSFWMOUNTENTRY_H
20 #define CRSFWMOUNTENTRY_H
25 #include <rsfwmountentryitem.h>
28 // Drive entry constants
29 // these come from UI specification
30 const TInt KMaxMountNameLength = 20;
31 const TInt KMaxMountUriLength = 200;
32 const TInt KMaxMountUserNameLength = 50;
33 const TInt KMaxMountPasswordLength = 50;
34 const TInt KMaxMountAuxDataLength = 64;
35 const TInt KMaxMountConfItemLength = 200; // Longest possible conf item value.
36 const TInt KMaxMountConfLength = 512; // Buffer for sending all drive
37 // configuration values
38 const TInt KIndexAsStringLength = 4; // how wide string for index
43 * Remote drive (configuration) entry
45 * Drive configuration entry consists of the following values:
46 * - Index of the entry. Optional.
47 * - Friendly name. Mandatory.
48 * - Drive letter. Optional.
49 * - Drive URL. Mandatory.
50 * - User name. Optional.
51 * - Password. Optional
52 * - Internet Access point. Optional.
54 * Maximum lengths for the strings:
55 * - Friendly name 20 characters
56 * - Drive URL 200 characters
57 * - User name 50 characters
58 * - Password 50 characters
59 * Setter functions leave with KErrArgument, if longer values are attempted
61 * Drive Letter must be between J: and Y:
62 * (see also RFs::DriveList() documentation)¨
64 * Drive Url must begin with a valid scheme (e.g. https:// or upnp://)
67 * @since Series 60 3.1
69 class CRsfwMountEntry: public CBase
71 public: // Constructors and destructor
73 * Two-phased constructor.
75 IMPORT_C static CRsfwMountEntry* NewL();
78 * Two-phased constructor
80 IMPORT_C static CRsfwMountEntry* NewLC();
85 IMPORT_C virtual ~CRsfwMountEntry();
89 * @param aIndex item index
90 * @param aValue string value
91 * @leave KErrArgument, incorrect index or value
93 IMPORT_C void SetItemL(TInt aIndex, const TDesC8& aValue);
97 * @param aIndex item index
98 * @param aValue string value
99 * @leave KErrArgument, incorrect index or value
101 IMPORT_C void SetItemL(TInt aIndex, const TDesC& aValue);
104 * Sets all item values
105 * @param aIndex index (only used for positioning the entry - not stored)
107 * @param aDriveLetter drive letter
109 * @param aUserName user name
110 * @param aPassword password
111 * @param aIap IAP name
112 * @leave KErrArgument, one or more parameters incorrect
114 IMPORT_C void SetEntryL(TInt aIndex,
118 const TDesC& aUserName,
119 const TDesC& aPassword,
123 * Returns an item value
124 * An empty value may be an empty string or NULL
126 IMPORT_C const HBufC* Item(TInt aIndex) const;
129 * Clear the entry - the items are set to NULL
131 IMPORT_C void Clear();
134 * Clone the entry - the items are are copied to the newly created entry
135 * @return cloned entry
137 IMPORT_C CRsfwMountEntry* CloneL() const;
145 HBufC* iMountEntryItems[EMountEntryItemCount];
148 #endif // CRSFWMOUNTENTRY_H