os/ossrv/ossrv_plat/libutils/inc/libutils.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description:   Contains all the API signatures
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
sl@0
    20
#ifndef __LIBUTILS_H__
sl@0
    21
#define __LIBUTILS_H__
sl@0
    22
sl@0
    23
#include <e32cmn.h>
sl@0
    24
#include <string>
sl@0
    25
sl@0
    26
using namespace std;
sl@0
    27
sl@0
    28
enum TErrorCodes 
sl@0
    29
{
sl@0
    30
    ESuccess = 0,
sl@0
    31
	EInsufficientMemory = -1,
sl@0
    32
    EInvalidSize = -2,
sl@0
    33
    EStringNoData = -3,
sl@0
    34
    EInvalidPointer = -4,
sl@0
    35
    EDescriptorNoData = -5,
sl@0
    36
    EUseNewMaxL = -6,
sl@0
    37
    EInvalidMBSSequence = -7,
sl@0
    38
    EInvalidWCSSequence = -8,
sl@0
    39
    EInsufficientSystemMemory = -9
sl@0
    40
};
sl@0
    41
sl@0
    42
IMPORT_C int CharToTbuf16(const char* aSrc, TDes16& aDes);
sl@0
    43
sl@0
    44
IMPORT_C int CharToTbuf8(const char* aSrc, TDes8& aDes);
sl@0
    45
sl@0
    46
IMPORT_C int CharToHbufc16(const char* aSrc, HBufC16* aDes);
sl@0
    47
sl@0
    48
IMPORT_C int CharToHbufc8(const char* aSrc, HBufC8* aDes);
sl@0
    49
sl@0
    50
IMPORT_C int CharpToTptr8(const char* aSrc, TPtr8& aDes);
sl@0
    51
sl@0
    52
IMPORT_C int CharpToTptr16(const char* aSrc, TPtr16& aDes);
sl@0
    53
sl@0
    54
IMPORT_C int CharpToTptrc16(char* aSrc, wchar_t* cPtr, TPtrC16& aDes);
sl@0
    55
sl@0
    56
IMPORT_C int CharpToTptrc8(const char* aSrc, TPtrC8& aDes);
sl@0
    57
sl@0
    58
IMPORT_C int CharToRbuf16(const char* aSrc, RBuf16& aDes);
sl@0
    59
sl@0
    60
IMPORT_C int WcharToTbuf16(const wchar_t* aSrc, TDes16& aDes);
sl@0
    61
sl@0
    62
IMPORT_C int WcharToTbuf8(const wchar_t* aSrc, TDes8& aDes);
sl@0
    63
sl@0
    64
IMPORT_C int WcharToHbufc8(const wchar_t* aSrc, HBufC8* aDes);
sl@0
    65
sl@0
    66
IMPORT_C int WcharToHbufc16(const wchar_t* aSrc, HBufC16* aDes);
sl@0
    67
sl@0
    68
IMPORT_C int WcharpToTptr16(const wchar_t* aSrc, TPtr16& aDes);
sl@0
    69
sl@0
    70
IMPORT_C int WcharpToTptr8 (const wchar_t* aSrc, char *cPtr, TPtr8& aDes);
sl@0
    71
sl@0
    72
IMPORT_C int WcharpToTptrc8 (const wchar_t* aSrc, char* cPtr, TPtrC8& aDes);
sl@0
    73
sl@0
    74
IMPORT_C int WcharpToTptrc16 (const wchar_t* aSrc, TPtrC16& aDes);
sl@0
    75
sl@0
    76
IMPORT_C int WcharToRbuf8 (const wchar_t* aSrc, RBuf8& aDes);
sl@0
    77
sl@0
    78
IMPORT_C int WcharToRbuf16 (const wchar_t* aSrc, RBuf16& aDes);
sl@0
    79
sl@0
    80
IMPORT_C  int StringToTbuf8 (string& aString, TDes8& aDes);
sl@0
    81
sl@0
    82
IMPORT_C  int StringToTbuf16 (string& aString, TDes16& aDes);
sl@0
    83
sl@0
    84
IMPORT_C  int StringToTptrc16 (string& aString, wchar_t *wptr, TPtrC16& aDes);
sl@0
    85
sl@0
    86
IMPORT_C int StringToTptrc8 (string& aString, TPtrC8& aDes);
sl@0
    87
sl@0
    88
IMPORT_C  int StringToTptr8 (string& aString, TPtr8& aDes);
sl@0
    89
sl@0
    90
IMPORT_C int StringToTptr16 (string& aSrc, wchar_t *wPtr, TPtr16& aDes);
sl@0
    91
sl@0
    92
IMPORT_C int StringToHbufc16 (string& aString, HBufC16* aDes);
sl@0
    93
sl@0
    94
IMPORT_C int StringToHbufc8 (string& aString, HBufC8* aDes);
sl@0
    95
sl@0
    96
IMPORT_C int StringToRbuf8 (const string& aSrc, RBuf8& aDes);
sl@0
    97
sl@0
    98
IMPORT_C int StringToRbuf16 (const string& aSrc, RBuf16& aDes);
sl@0
    99
sl@0
   100
IMPORT_C int WstringToTbuf8 (wstring& aString, TDes8& aDes);
sl@0
   101
sl@0
   102
IMPORT_C int WstringToTptr8 (wstring& aString, char* cPtr, TPtr8& aDes);
sl@0
   103
sl@0
   104
IMPORT_C int WstringToTptr16 (wstring& aString, TPtr16& aDes);
sl@0
   105
sl@0
   106
IMPORT_C int WstringToTptrc8 (wstring& aString, char* cPtr, TPtrC8& aDes);
sl@0
   107
sl@0
   108
IMPORT_C int WstringToTptrc16 (wstring& aString , TPtrC16& aDes);
sl@0
   109
sl@0
   110
IMPORT_C int WstringToRbuf8 (const wstring& aSrc, RBuf8& aDes);
sl@0
   111
sl@0
   112
IMPORT_C int WstringToRbuf16 (const wstring& aSrc, RBuf16& aDes);
sl@0
   113
sl@0
   114
IMPORT_C int Tbuf8ToString (TDes8& aSrc, string& aDes);
sl@0
   115
sl@0
   116
IMPORT_C int Tptr8ToString (TDes8& aSrc, string& aDes);
sl@0
   117
sl@0
   118
IMPORT_C int Tptrc8ToString (const TDesC8& aSrc, string& aDes);
sl@0
   119
sl@0
   120
IMPORT_C int Tptr16ToString (TDes16& aDes, string& astring);
sl@0
   121
sl@0
   122
IMPORT_C int Tptrc16ToString (const TDesC16& aDes, string& aString);
sl@0
   123
sl@0
   124
IMPORT_C int Hbufc16ToString (HBufC16* aSrc, string& aString, int& n_size);
sl@0
   125
sl@0
   126
IMPORT_C int Hbufc8ToString (HBufC8* aSrc, string& aString);
sl@0
   127
sl@0
   128
IMPORT_C int Rbuf8ToString (TDes8& aSrc, string& aDes);
sl@0
   129
sl@0
   130
IMPORT_C int Tbuf8ToChar (TDes8& aSrc, char* aDes, int& n_size);
sl@0
   131
sl@0
   132
IMPORT_C int Tbuf16ToChar(TDes16& aSrc, char* aDes, int& n_size);
sl@0
   133
sl@0
   134
IMPORT_C int Tbufc8ToChar (TDesC8& aSrc, char* aDes, int &n_size);
sl@0
   135
sl@0
   136
IMPORT_C int Tbufc16ToChar (TDesC16& aSrc, char* aDes, int &n_size);
sl@0
   137
sl@0
   138
IMPORT_C int Tlitc8ToChar (const TDesC8& aDes, char* aSrc, int& n_size);
sl@0
   139
sl@0
   140
IMPORT_C int Tlitc16ToChar (const TDesC16& aDes, char* aSrc,int& n_size);
sl@0
   141
sl@0
   142
IMPORT_C int Tptr8ToChar (const TDes8& aSrc, char* aDes, int& n_size);
sl@0
   143
sl@0
   144
IMPORT_C int Tptr16ToCharp (const TDes16& aSrc, char* aDes, int& n_size);
sl@0
   145
sl@0
   146
IMPORT_C int Tptrc8ToCharp (TPtrC8& aSrc, char* aDes, int& n_size);
sl@0
   147
sl@0
   148
IMPORT_C int Tptrc16ToCharp (TPtrC16& aSrc, char* aDes, int& n_size);
sl@0
   149
sl@0
   150
IMPORT_C int Rbuf8ToChar (TDes8& aSrc, char * aDes, int& n_size);
sl@0
   151
sl@0
   152
IMPORT_C int Rbuf16ToChar (TDes16& aSrc, char* aDes, int& n_size);
sl@0
   153
sl@0
   154
IMPORT_C int Tbuf8ToWchar (TDes8& aSrc , wchar_t* aDes, int& n_size);
sl@0
   155
sl@0
   156
IMPORT_C int Tbuf16ToWchar (const TDes16& aSrc, wchar_t* aDes, int &n_size);
sl@0
   157
sl@0
   158
IMPORT_C int Tbufc8ToWchar (TDesC8& aSrc, wchar_t* aDes, int& n_size);
sl@0
   159
sl@0
   160
IMPORT_C int Tbufc16ToWchar (TDesC& aSrc, wchar_t* aDes, int& n_size);
sl@0
   161
sl@0
   162
IMPORT_C int Tlitc8ToWchar (const TDesC8& aDes, wchar_t* aSrc, int& n_size);
sl@0
   163
sl@0
   164
IMPORT_C int Tlitc16ToWchar (const TDesC16& aSrc, wchar_t* aDes, int& n_size);
sl@0
   165
sl@0
   166
IMPORT_C int Tptr8ToWcharp (const TPtr8& aSrc, wchar_t* aDes, int& n_size);
sl@0
   167
sl@0
   168
IMPORT_C int Tptr16ToWcharp (const TPtr16& aSrc, wchar_t* aDes, int& n_size);
sl@0
   169
sl@0
   170
IMPORT_C int Tptrc8ToWcharp (TPtrC8& aSrc, wchar_t* aDes, int& n_size);
sl@0
   171
sl@0
   172
IMPORT_C int Tptrc16ToWcharp (TPtrC16& aSrc, wchar_t* aDes, int& n_size);
sl@0
   173
sl@0
   174
IMPORT_C int Rbuf8ToWchar (TDes8& aSrc, wchar_t* aDes, int& n_size);
sl@0
   175
sl@0
   176
IMPORT_C int Rbuf16ToWchar (TDes16& aSrc, wchar_t* aDes, int& n_size);
sl@0
   177
sl@0
   178
IMPORT_C int WcharpToTptrc8(const wchar_t* aSrc, TDes16& aDes);
sl@0
   179
sl@0
   180
IMPORT_C int WcharpToTptr16(const wchar_t* aSrc, TDes16& aDes);
sl@0
   181
sl@0
   182
IMPORT_C int Tptrc8ToWstring (TPtrC8& aSrc, wstring& aDes);
sl@0
   183
sl@0
   184
IMPORT_C int Tptrc16ToWstring (TPtrC16& aSrc, wstring& aDes);
sl@0
   185
sl@0
   186
IMPORT_C int Tptr8ToWstring (TPtr8& aSrc, wstring& aDes);
sl@0
   187
sl@0
   188
IMPORT_C int Tptr16ToWstring (TPtr16& aSrc, wstring& aDes);
sl@0
   189
sl@0
   190
IMPORT_C int Rbuf8ToWstring (TDes8& aSrc, wstring& aDes);
sl@0
   191
sl@0
   192
IMPORT_C int Rbuf16ToWstring (TDes16& aSrc, wstring& aDes);
sl@0
   193
sl@0
   194
IMPORT_C int Rbuf16ToString(TDes16& aSrc, string& aDes);
sl@0
   195
sl@0
   196
IMPORT_C int Tbufc8ToString(TDesC8& aSrc, string& aDes);
sl@0
   197
sl@0
   198
IMPORT_C int Tbufc16ToString(TDesC16& aSrc, string& aDes);
sl@0
   199
sl@0
   200
IMPORT_C int Tlit8ToString(const TDesC8& aSrc, string& aDes);
sl@0
   201
sl@0
   202
IMPORT_C int Tlit16ToString(const TDesC16& aSrc, string& aDes);
sl@0
   203
sl@0
   204
IMPORT_C int Hbufc16ToWstring(HBufC16* aSrc, wstring& aDes);
sl@0
   205
sl@0
   206
IMPORT_C int Tlitc16ToWstring(TDesC16* aSrc, wstring& aDes);
sl@0
   207
sl@0
   208
IMPORT_C int Tlitc8ToWstring(TDes8& aSrc, wstring& aDes);
sl@0
   209
sl@0
   210
IMPORT_C int Hbufc8ToWstring(HBufC8* aSrc, wstring& aDes);
sl@0
   211
sl@0
   212
IMPORT_C int WstringToHbufc8(wstring& aSrc, HBufC8* aDes);
sl@0
   213
sl@0
   214
IMPORT_C int WstringToTbuf16(wstring& aSrc, TDes16& aDes);
sl@0
   215
sl@0
   216
IMPORT_C int WstringToHbufc16(wstring& aSrc, HBufC16* aDes);
sl@0
   217
sl@0
   218
IMPORT_C int CharToRbuf8(const char* aSrc, RBuf8& aDes);
sl@0
   219
sl@0
   220
IMPORT_C int Tbuf8ToWstring(TDes8& aSrc, wstring& aDes);
sl@0
   221
sl@0
   222
IMPORT_C int Tbufc8ToWstring(TDesC8& aSrc, wstring& aDes);
sl@0
   223
sl@0
   224
IMPORT_C int HBufc8ToWchar(HBufC8* aSrc, wchar_t* aDes, int& n_size);
sl@0
   225
sl@0
   226
IMPORT_C int Tbuf16ToWstring(TDes16& aSrc, wstring& aDes);
sl@0
   227
sl@0
   228
IMPORT_C int Hbufc16ToWchar(const HBufC16* aSrc, wchar_t* aDes, int& n_size);
sl@0
   229
sl@0
   230
IMPORT_C int Hbufc8ToChar(HBufC8 *aSrc, char* aDes, int& n_size);
sl@0
   231
sl@0
   232
IMPORT_C int Tbuf16ToString(TDes16& aSrc, string& aDes);
sl@0
   233
sl@0
   234
#endif  // __LIBUTILS_H__
sl@0
   235
sl@0
   236