Main Page | File List | File Members

String.h

Go to the documentation of this file.
00001 /* -*- mode: c++; -*-
00002  *-----------------------------------------------------------------------------
00003  * $RCSfile: String.h,v $
00004  *
00005  * See Copyright for the status of this software.
00006  *
00007  * The OpenSOAP Project
00008  * http://opensoap.jp/
00009  *-----------------------------------------------------------------------------
00010  */
00011 #ifndef OpenSOAP_String_H
00012 #define OpenSOAP_String_H
00013 
00014 #include <OpenSOAP/ByteArray.h>
00015 #include <stdarg.h>
00016 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif /* __cplusplus */
00026 
00031     typedef struct tagOpenSOAPString OpenSOAPString;
00032 
00037     typedef OpenSOAPString    *OpenSOAPStringPtr;
00038 
00039 
00048     int
00049     OPENSOAP_API
00050     OpenSOAPStringCreate(/* [out] */ OpenSOAPStringPtr *str);
00051     
00062     int
00063     OPENSOAP_API
00064     OpenSOAPStringCreateWithMB(/* [in]  */ const char *mb_str,
00065                                /* [out] */ OpenSOAPStringPtr *str);
00066 
00077     int
00078     OPENSOAP_API
00079     OpenSOAPStringCreateWithWC(/* [in]  */ const wchar_t *wc_str,
00080                                /* [out] */ OpenSOAPStringPtr *str);
00081 
00094     int
00095     OPENSOAP_API
00096     OpenSOAPStringCreateWithCharEncodingString(/* [in]  */ const char * char_enc,
00097                                                /* [in]  */ OpenSOAPByteArrayPtr char_enc_str,
00098                                                /* [out] */ OpenSOAPStringPtr *str);
00099 
00110     int
00111     OPENSOAP_API
00112     OpenSOAPStringCreateWithUTF8(/* [in]  */ const char *utf8Str,
00113                                  /* [out] */ OpenSOAPStringPtr *str);
00114 
00123     int
00124     OPENSOAP_API
00125     OpenSOAPStringRetain(/* [in] */ OpenSOAPStringPtr str);
00126 
00135     int
00136     OPENSOAP_API
00137     OpenSOAPStringRelease(/* [in] */ OpenSOAPStringPtr str);
00138 
00149     int
00150     OPENSOAP_API
00151     OpenSOAPStringGetLengthMB(/* [in]  */ OpenSOAPStringPtr str,
00152                               /* [out] */ size_t *len);
00153         
00164     int
00165     OPENSOAP_API
00166     OpenSOAPStringGetLengthWC(/* [in]  */ OpenSOAPStringPtr str,
00167                               /* [out] */ size_t *len);
00168 
00185     int
00186     OPENSOAP_API
00187     OpenSOAPStringGetStringMBWithAllocator(/* [in]  */ OpenSOAPStringPtr str,
00188                                            /* [in]  */ char * (*memAllocator)(size_t),
00189                                            /* [out] */ size_t *len,
00190                                            /* [out] */ char **mbStr);
00191 
00208     int
00209     OPENSOAP_API
00210     OpenSOAPStringGetStringWCWithAllocator(/* [in]  */ OpenSOAPStringPtr str,
00211                                            /* [in]  */ wchar_t * (*memAllocator)(size_t),
00212                                            /* [out] */ size_t *len,
00213                                            /* [out] */ wchar_t **wcStr);
00214 
00231     int
00232     OPENSOAP_API
00233     OpenSOAPStringGetStringUTF8WithAllocator(/* [in]  */ OpenSOAPStringPtr str,
00234                                              /* [in]  */ char * (*memAllocator)(size_t),
00235                                              /* [out] */ size_t *len,
00236                                              /* [out] */ char **utf8Str);
00237 
00250     int
00251     OPENSOAP_API
00252     OpenSOAPStringGetStringMB(/* [in]      */ OpenSOAPStringPtr str,
00253                               /* [in, out] */ size_t *len,
00254                               /* [out]     */ char * mb_Str);
00255         
00268     int
00269     OPENSOAP_API
00270     OpenSOAPStringGetStringWC(/* [in]      */ OpenSOAPStringPtr str,
00271                               /* [in, out] */ size_t *len,
00272                               /* [out]     */ wchar_t *wc_str);
00273 
00286     int
00287     OPENSOAP_API
00288     OpenSOAPStringGetCharEncodingString(/* [in]  */ OpenSOAPStringPtr str,
00289                                         /* [in]  */ const char *char_enc,
00290                                         /* [out] */ OpenSOAPByteArrayPtr char_enc_str);
00291     
00302     int
00303     OPENSOAP_API
00304     OpenSOAPStringSetStringMB(/* [in] */ OpenSOAPStringPtr str,
00305                               /* [in] */ const char *mb_str);
00306         
00317     int
00318     OPENSOAP_API
00319     OpenSOAPStringSetStringWC(/* [in] */ OpenSOAPStringPtr str,
00320                               /* [in] */ const wchar_t *wc_str);
00321 
00334     int
00335     OPENSOAP_API
00336     OpenSOAPStringSetCharEncodingString(/* [out] */ OpenSOAPStringPtr str,
00337                                         /* [in]  */ const char *char_enc,
00338                                         /* [in]  */ OpenSOAPByteArrayPtr charEncStr);
00339 
00350     int
00351     OPENSOAP_API
00352     OpenSOAPStringSetStringUTF8(/* [out] */ OpenSOAPStringPtr str,
00353                                 /* [in]  */ const char *utf8Str);
00354 
00367     int
00368     OPENSOAP_API
00369     OpenSOAPStringFormatMB(/* [out] */ OpenSOAPStringPtr str,
00370                            /* [in]  */ const char *format, ...);
00371 
00384     int
00385     OPENSOAP_API
00386     OpenSOAPStringFormatWC(/* [out] */ OpenSOAPStringPtr str,
00387                            /* [in]  */ const wchar_t *format, ...);
00388 
00401     int
00402     OPENSOAP_API
00403     OpenSOAPStringVFormatMB(/* [out] */ OpenSOAPStringPtr str,
00404                                                         /* [in]  */ const char *format,
00405                                                         /* [in]  */ va_list ap);
00406 
00419     int
00420     OPENSOAP_API
00421     OpenSOAPStringVFormatWC(/* [out] */ OpenSOAPStringPtr str,
00422                                                         /* [in]  */ const wchar_t *format,
00423                                                         /* [in]  */ va_list ap);
00424 
00437     int
00438     OPENSOAP_API
00439     OpenSOAPStringCompareMB(/* [in]  */ OpenSOAPStringPtr str,
00440                             /* [in]  */ const char *cmp_str,
00441                             /* [out] */ int *cmp_rslt);
00442 
00455     int
00456     OPENSOAP_API
00457     OpenSOAPStringCompareWC(/* [in]  */ OpenSOAPStringPtr str,
00458                             /* [in]  */ const wchar_t *cmp_str,
00459                             /* [out] */ int *cmp_rslt);
00460 
00473     int
00474     OPENSOAP_API
00475     OpenSOAPStringCompare(/* [in]  */ OpenSOAPStringPtr str,
00476                           /* [in]  */ OpenSOAPStringPtr cmp_str,
00477                           /* [out] */ int *cmp_rslt);
00478 
00491     int
00492     OPENSOAP_API
00493     OpenSOAPStringFindStringMB(/* [in]      */ OpenSOAPStringPtr str,
00494                                /* [in]      */ const char *find_str,
00495                                /* [in, out] */ size_t *idx);
00496 
00509     int
00510     OPENSOAP_API
00511     OpenSOAPStringFindStringWC(/* [in]      */ OpenSOAPStringPtr str,
00512                                /* [in]      */ const wchar_t *find_str,
00513                                /* [in, out] */ size_t *idx);
00514 
00527     int
00528     OPENSOAP_API
00529     OpenSOAPStringFindString(/* [in]      */ OpenSOAPStringPtr str,
00530                              /* [in]      */ OpenSOAPStringPtr find_str,
00531                              /* [in, out] */ size_t *idx);
00532 
00545     typedef int
00546     (*OpenSOAPStringFindIfFunc)(/* [in, out] */ void *opt,
00547                                 /* [in]      */ wchar_t c,
00548                                 /* [out]     */ int *judge);
00549         
00564     extern
00565     int
00566     OPENSOAP_API
00567     OpenSOAPStringFindIfStringIndex(/* [in]  */ OpenSOAPStringPtr str,
00568                                     /* [in]  */ OpenSOAPStringFindIfFunc find_func,
00569                                     /* [in]  */ void *find_func_opt,
00570                                     /* [in, out] */ size_t *idx);
00585     int
00586     OPENSOAP_API
00587     OpenSOAPStringReplaceStringMB(/* [in, out] */ OpenSOAPStringPtr str,
00588                                   /* [in]      */ const char *find_str,
00589                                   /* [in]      */ const char *rplc_str,
00590                                   /* [in, out] */ size_t *idx);
00591     
00606     int
00607     OPENSOAP_API
00608     OpenSOAPStringReplaceStringWC(/* [in, out] */ OpenSOAPStringPtr str,
00609                                   /* [in]      */ const wchar_t *find_str,
00610                                   /* [in]      */ const wchar_t *rplc_str,
00611                                   /* [in, out] */ size_t *idx);
00612     
00627     int
00628     OPENSOAP_API
00629     OpenSOAPStringReplaceString(/* [in, out] */ OpenSOAPStringPtr str,
00630                                 /* [in]      */ OpenSOAPStringPtr find_str,
00631                                 /* [in]      */ OpenSOAPStringPtr rplc_str,
00632                                 /* [in, out] */ size_t *idx);
00633     
00642     int
00643     OPENSOAP_API
00644     OpenSOAPStringClear(/* [out] */ OpenSOAPStringPtr str);
00645 
00658     int
00659     OPENSOAP_API
00660     OpenSOAPStringAppendMB(/* [out] */ OpenSOAPStringPtr str,
00661                            /* [in]  */ const char *mb_str,
00662                            /* [in]  */ size_t mb_len);
00663 
00676     int
00677     OPENSOAP_API
00678     OpenSOAPStringAppendWC(/* [out] */ OpenSOAPStringPtr str,
00679                            /* [in]  */ const wchar_t *wc_str,
00680                            /* [in]  */ size_t wc_len);
00681 
00692     int
00693     OPENSOAP_API
00694     OpenSOAPStringDuplicate(/* [in]  */ OpenSOAPStringPtr str,
00695                             /* [out] */ OpenSOAPStringPtr *dup_str);
00696 
00711     int
00712     OPENSOAP_API
00713     OpenSOAPStringGetSubstring(/* [in]  */ OpenSOAPStringPtr str,
00714                                /* [in]  */ size_t   beg,
00715                                /* [in]  */ size_t   len,
00716                                /* [out] */ OpenSOAPStringPtr *sub_str);
00717 
00732     int
00733     OPENSOAP_API
00734     OpenSOAPStringConvertCharEncoding(/* [in]  */ const char *from_enc,
00735                                       /* [in]  */ OpenSOAPByteArrayPtr from_str,
00736                                       /* [in]  */ const char *to_enc,
00737                                       /* [out] */ OpenSOAPByteArrayPtr to_str);
00738 
00749     int
00750     OPENSOAP_API
00751     OpenSOAPStringConvertXMLCharRefToUTF8(/* [in]  */ const unsigned char *utf8Beg,
00752                                           /* [out] */ OpenSOAPByteArrayPtr utf8BAry);
00763     int
00764     OPENSOAP_API
00765     OpenSOAPStringGetStringUSASCII(/* [in]  */ OpenSOAPStringPtr str,
00766                                    /* [out] */ OpenSOAPByteArrayPtr charEncStr);
00767 
00784     int
00785     OPENSOAP_API
00786     OpenSOAPStringIterateProc(/* [in]  */ OpenSOAPStringPtr str,
00787                               /* [in]  */ int (*iterateProc)(unsigned long c, size_t idx, size_t len, void *opt),
00788                               /* [in]  */ int (*beforeProc)(size_t len, void *opt),
00789                               /* [in]  */ int (*afterProc)(size_t len, void *opt),
00790                               /* [in, out] */ void *opt);
00791         
00792 #ifdef __cplusplus
00793 }
00794 #endif /* __cplusplus */
00795 
00796 #endif /* OpenSOAP_String_H */

Generated on Mon Oct 18 18:29:44 2004 for OpenSOAP by doxygen 1.3.6