2 * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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 express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
30 #endif /* __cplusplus */
32 /* #define ORG_ENABLE_TRACE */
33 #define FEATURE_SHIFT_JIS
35 #ifdef ORG_ENABLE_TRACE
36 #define USER_TAG "MSG_FW"
37 #define VDATA_TRACE(fmt, arg...) \
39 SLOG(LOG_DEBUG, USER_TAG, "\n[calendarui] %s:%d: " fmt "\n", __FUNCTION__, __LINE__, ##arg); \
43 #define VDATA_TRACE_LINE() fprintf(stderr, "\n[calendarui] %s:%d\n", __FUNCTION__, __LINE__ )
45 #define SysRequireEx(expr, retValue) \
47 fprintf(stderr, "INVALID_PARAM (%d lines in %s)\n", __LINE__, __FILE__); \
51 #define USER_TAG "MSG_SERVICE"
52 #define VDATA_TRACE(fmt, arg...) \
54 SLOG(LOG_DEBUG, USER_TAG, "\n[calendarui] %s:%d: " fmt "\n", __FUNCTION__, __LINE__, ##arg); \
57 #define VDATA_TRACE_LINE()
58 #define SysRequireEx(expr, retValue)
61 #define VDATA_TRACE_BEGINE /* VDATA_TRACE(">>>>>> start. >>>>>>"); usleep(1000); */
62 #define VDATA_TRACE_END /* VDATA_TRACE(">>>>>> end. >>>>>>"); */
64 /****************************************************************************************************/
65 /* FUNCTION DECLARATION */
66 /****************************************************************************************************/
68 int _VRLSpace(char *);
69 int _VRTSpace(char *);
70 int _VUnescape(char*);
72 int _VManySpace2Space(char *);
73 int _VB64Decode(char *, char *);
74 int _VB64Encode(char *, char *, int);
75 int _VUnfolding(char *);
76 void _VFolding(char *, char *);
77 int _VQPDecode(char *);
78 int _VQPEncode(char *, char *);
80 void _VFoldingQP(char *result, char *contentline);
81 void _VFoldingNoSpace(char *result, char *contentline);
82 int _VManyCRLF2CRLF(char *pIn);
83 int _VUnfoldingNoSpec(char *string, int vType);
87 #endif /* __cplusplus */