summaryrefslogtreecommitdiff
path: root/pjlib/include/pj/unicode.h
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-06-16 16:52:51 +0000
committerBenny Prijono <bennylp@teluu.com>2006-06-16 16:52:51 +0000
commitedf38f478920a443dc29cf3d638e6b27d7a838e6 (patch)
tree36429dc70ed27c292dc61949ff262fb3bcdc80f7 /pjlib/include/pj/unicode.h
parentb7898cf10e4e9048d28d858ccffcdf3937703752 (diff)
Fixed pjlib doxygen documentation
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@514 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/unicode.h')
-rw-r--r--pjlib/include/pj/unicode.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/pjlib/include/pj/unicode.h b/pjlib/include/pj/unicode.h
index e70f5fb5..e19b1da1 100644
--- a/pjlib/include/pj/unicode.h
+++ b/pjlib/include/pj/unicode.h
@@ -22,6 +22,12 @@
#include <pj/types.h>
+/**
+ * @defgroup PJ_UNICODE Unicode Support
+ * @ingroup PJ_MISC
+ * @{
+ */
+
PJ_BEGIN_DECL
@@ -60,20 +66,64 @@ PJ_DECL(char*) pj_unicode_to_ansi(const wchar_t *wstr, pj_size_t len,
#if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0
+/**
+ * This macro is used to declare temporary Unicode buffer for ANSI to
+ * Unicode conversion, and should be put in declaration section of a block.
+ * When PJ_NATIVE_STRING_IS_UNICODE macro is not defined, this
+ * macro will expand to nothing.
+ */
# define PJ_DECL_UNICODE_TEMP_BUF(buf,size) wchar_t buf[size];
+
+/**
+ * This macro will convert ANSI string to native, when the platform's
+ * native string is Unicode (PJ_NATIVE_STRING_IS_UNICODE is non-zero).
+ */
# define PJ_STRING_TO_NATIVE(s,buf,max) pj_ansi_to_unicode( \
s, strlen(s), \
buf, max)
+
+/**
+ * This macro is used to declare temporary ANSI buffer for Unicode to
+ * ANSI conversion, and should be put in declaration section of a block.
+ * When PJ_NATIVE_STRING_IS_UNICODE macro is not defined, this
+ * macro will expand to nothing.
+ */
# define PJ_DECL_ANSI_TEMP_BUF(buf,size) char buf[size];
+
+
+/**
+ * This macro will convert Unicode string to ANSI, when the platform's
+ * native string is Unicode (PJ_NATIVE_STRING_IS_UNICODE is non-zero).
+ */
# define PJ_NATIVE_TO_STRING(cs,buf,max) pj_unicode_to_ansi( \
cs, wcslen(cs), \
buf, max)
#else
+/**
+ * This macro is used to declare temporary Unicode buffer for ANSI to
+ * Unicode conversion, and should be put in declaration section of a block.
+ * When PJ_NATIVE_STRING_IS_UNICODE macro is not defined, this
+ * macro will expand to nothing.
+ */
# define PJ_DECL_UNICODE_TEMP_BUF(var,size)
+/**
+ * This macro will convert ANSI string to native, when the platform's
+ * native string is Unicode (PJ_NATIVE_STRING_IS_UNICODE is non-zero).
+ */
# define PJ_STRING_TO_NATIVE(s,buf,max) ((char*)s)
+/**
+ * This macro is used to declare temporary ANSI buffer for Unicode to
+ * ANSI conversion, and should be put in declaration section of a block.
+ * When PJ_NATIVE_STRING_IS_UNICODE macro is not defined, this
+ * macro will expand to nothing.
+ */
# define PJ_DECL_ANSI_TEMP_BUF(buf,size)
+/**
+ * This macro will convert Unicode string to ANSI, when the platform's
+ * native string is Unicode (PJ_NATIVE_STRING_IS_UNICODE is non-zero).
+ */
# define PJ_NATIVE_TO_STRING(cs,buf,max) ((char*)(const char*)cs)
#endif
@@ -82,5 +132,9 @@ PJ_DECL(char*) pj_unicode_to_ansi(const wchar_t *wstr, pj_size_t len,
PJ_END_DECL
+/*
+ * @}
+ */
+
#endif /* __PJ_UNICODE_H__ */