author | Petteri Saari <petteri.saari@digia.com> |
Thu, 25 Nov 2010 13:59:42 +0200 | |
branch | MSRP_FrameWork |
changeset 58 | cdb720e67852 |
parent 25 | 505ad3f0ce5c |
permissions | -rw-r--r-- |
25
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
1 |
/* |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
2 |
* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
3 |
* All rights reserved. |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html." |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
8 |
* Initial Contributors: |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
9 |
* Nokia Corporation - initial contribution. |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
10 |
* Contributors: |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
11 |
* |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
12 |
* Description: |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
13 |
* MSRP Implementation |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
14 |
* |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
15 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
16 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
17 |
#ifndef __TMSRPHEADERUTIL_H__ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
18 |
#define __TMSRPHEADERUTIL_H__ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
19 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
20 |
// INCLUDES |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
21 |
#include <e32base.h> |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
22 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
23 |
// CLASS DEFINITION |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
24 |
/** |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
25 |
* Static utility class, used by MSRP Client |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
26 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
27 |
class TMSRPHeaderUtil |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
28 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
29 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
30 |
public: |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
31 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
32 |
/** |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
33 |
* Convert given string to a number, leaves if string cannot be converted |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
34 |
* @param aString string to be converted |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
35 |
* @return string converted to number |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
36 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
37 |
static TInt ConvertToNumber( const TDesC8& aString ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
38 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
39 |
/** |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
40 |
* Append a string from a destination to source descriptor |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
41 |
* @param aSource string to be added |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
42 |
* @param aDest destination descriptor |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
43 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
44 |
static void AppendStringL( const TDesC8& aString, TDes8& aDest ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
45 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
46 |
/** |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
47 |
* Checks that given string consists of only the allowed characters |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
48 |
* @param aString string to check |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
49 |
* @return True if string valid, false if contained illegal characters |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
50 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
51 |
static TBool CheckStringValidity( const TDesC8& aString ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
52 |
}; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
53 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
54 |
#endif // __TMSRPHEADERUTIL_H__ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
55 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
56 |
// End of File |