• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 
19 // -*- c++ -*-
20 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
21 
22 //                     pv_string_uri
23 
24 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
25 
26 /*! \addtogroup gen_data_structures
27  *
28  * @{
29  */
30 
31 
32 /*! \pv_string_uri.h
33     \brief strinig uri management class
34 
35 */
36 
37 #ifndef PV_STRING_URI_H_INCLUDE
38 #define PV_STRING_URI_H_INCLUDE
39 
40 
41 
42 #include "oscl_stdstring.h"
43 #include "oscl_mem_basic_functions.h"
44 #include "oscl_mem.h"
45 #include  "oscl_base_macros.h"
46 #include "oscl_base.h"
47 
48 #define MAX_FULL_REQUEST_SIZE 4000
49 #define PERSENTAGE '%'
50 
51 
52 
53 /**
54  * Pv_String_Uri is a non-templatized base class for Uri.
55  * The purpose of this base class is to Escaping the illigal character in the URI
56  * in the Pv_String_Uri implementation.
57  * Specially it will convert %NotMatch-Char to %25.
58  */
59 
60 
61 class PVStringUri
62 {
63 
64     private:
65 
66 
67     public:
68         /**
69         * PersentageToEscapedEncoding utility function provides the Persentage Pct-Encoding to %25
70         * If Two Digit after % will not match in Legal Character List Of RFC-3896
71         * @param [in]/[Out] character Pointer; The complete URI
72         * @param [out] URL Lenght
73         *@return true if successful, otherwise false.
74         */
75         OSCL_IMPORT_REF static bool  PersentageToEscapedEncoding(char*, uint32 &);
76 
77         /**
78         * IllegalCharactersToEscapedEncoding utility function provides the EscapedEncoding
79         * for illegal character , Which are not fall in URI-Legal Character List Of RFC-3896
80         * @param [in]/[Out] character Pointer; The complete URI
81         * @param [out] URL Lenght
82         *@return true if successful, otherwise false.
83         */
84 
85         OSCL_IMPORT_REF static bool  IllegalCharactersToEscapedEncoding(char*, uint32 &);
86 
87 
88         /**
89         * DecimalToHexConverter utility function provides the Decimal To Hexa.
90         *
91         * @param [in] unsigned character Pointer.
92         * @param [out] Return The Hexa Value for a character.
93         * @return return Hexa Value for a character.
94         */
95 
96         OSCL_IMPORT_REF static unsigned char* DecimalToHexConverter(unsigned char aNumberIn, uint32 & aUrlMaxConvertLenght);
97 
98 
99     protected:
100 
101 
102 
103 };
104 
105 
106 
107 #endif // PV_STRING_URI_H_INCLUDE
108 /*! @} */
109 
110