Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:16.0:FactoryCandidates
id3lib
add-c-wrapper-functions.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File add-c-wrapper-functions.patch of Package id3lib
This patch adds C wrapper functions for field encoding. It was first introduced in version 3.8.3-8 and fixes http://bugs.debian.org/281292 --- a/include/id3.h +++ b/include/id3.h @@ -104,6 +104,9 @@ ID3_C_EXPORT void CCONV ID3Field_GetBINARY (const ID3Field *field, uchar *buffer, size_t buffLength); ID3_C_EXPORT void CCONV ID3Field_FromFile (ID3Field *field, const char *fileName); ID3_C_EXPORT void CCONV ID3Field_ToFile (const ID3Field *field, const char *fileName); + ID3_C_EXPORT bool CCONV ID3Field_SetEncoding (ID3Field *field, ID3_TextEnc enc); + ID3_C_EXPORT ID3_TextEnc CCONV ID3Field_GetEncoding (const ID3Field *field); + ID3_C_EXPORT bool CCONV ID3Field_IsEncodable (const ID3Field *field); /* field-info wrappers */ ID3_C_EXPORT char* CCONV ID3FrameInfo_ShortName (ID3_FrameID frameid); --- a/src/c_wrapper.cpp +++ b/src/c_wrapper.cpp @@ -681,6 +681,39 @@ } } + ID3_C_EXPORT bool CCONV + ID3Field_SetEncoding(ID3Field *field, ID3_TextEnc enc) + { + bool changed = false; + if (field) + { + ID3_CATCH(changed = reinterpret_cast<ID3_Field *>(field)->SetEncoding(enc)); + } + return changed; + } + + ID3_C_EXPORT ID3_TextEnc CCONV + ID3Field_GetEncoding(const ID3Field *field) + { + ID3_TextEnc enc = ID3TE_NONE; + if (field) + { + ID3_CATCH(enc = reinterpret_cast<const ID3_Field *>(field)->GetEncoding()); + } + return enc; + } + + ID3_C_EXPORT bool CCONV + ID3Field_IsEncodable(const ID3Field *field) + { + bool isEncodable = false; + if (field) + { + ID3_CATCH(isEncodable = reinterpret_cast<const ID3_Field *>(field)->IsEncodable()); + } + return isEncodable; + } + #ifdef __cplusplus } #endif /* __cplusplus */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor