1 This patch adds C wrapper functions for field encoding.
3 It was first introduced in version 3.8.3-8 and fixes
4 http://bugs.debian.org/281292
8 ID3_C_EXPORT void CCONV ID3Field_GetBINARY (const ID3Field *field, uchar *buffer, size_t buffLength);
9 ID3_C_EXPORT void CCONV ID3Field_FromFile (ID3Field *field, const char *fileName);
10 ID3_C_EXPORT void CCONV ID3Field_ToFile (const ID3Field *field, const char *fileName);
11 + ID3_C_EXPORT bool CCONV ID3Field_SetEncoding (ID3Field *field, ID3_TextEnc enc);
12 + ID3_C_EXPORT ID3_TextEnc CCONV ID3Field_GetEncoding (const ID3Field *field);
13 + ID3_C_EXPORT bool CCONV ID3Field_IsEncodable (const ID3Field *field);
15 /* field-info wrappers */
16 ID3_C_EXPORT char* CCONV ID3FrameInfo_ShortName (ID3_FrameID frameid);
17 --- a/src/c_wrapper.cpp
18 +++ b/src/c_wrapper.cpp
23 + ID3_C_EXPORT bool CCONV
24 + ID3Field_SetEncoding(ID3Field *field, ID3_TextEnc enc)
26 + bool changed = false;
29 + ID3_CATCH(changed = reinterpret_cast<ID3_Field *>(field)->SetEncoding(enc));
34 + ID3_C_EXPORT ID3_TextEnc CCONV
35 + ID3Field_GetEncoding(const ID3Field *field)
37 + ID3_TextEnc enc = ID3TE_NONE;
40 + ID3_CATCH(enc = reinterpret_cast<const ID3_Field *>(field)->GetEncoding());
45 + ID3_C_EXPORT bool CCONV
46 + ID3Field_IsEncodable(const ID3Field *field)
48 + bool isEncodable = false;
51 + ID3_CATCH(isEncodable = reinterpret_cast<const ID3_Field *>(field)->IsEncodable());
58 #endif /* __cplusplus */