/*! * \brief The autopatcher's identifier * * \note The returned string is dynamically allocated. It should be free()'d * when it is no longer needed. * * \param patcher CAutoPatcher object * \return AutoPatcher ID * * \sa AutoPatcher::id() */ char * mbp_autopatcher_id(const CAutoPatcher *patcher) { CCASTAP(patcher); return string_to_cstring(ap->id()); }
/*! * \brief Get the error information * * \note The returned CPatcherError is filled with valid data only if a * CAutoPatcher operation has failed. * * \note The returned CPatcherError should be freed with mbp_error_destroy() * when it is no longer needed. * * \param patcher CAutoPatcher object * * \return CPatcherError * * \sa AutoPatcher::error() */ CPatcherError * mbp_autopatcher_error(const CAutoPatcher *patcher) { CCASTAP(patcher); mbp::PatcherError *pe = new mbp::PatcherError(ap->error()); return reinterpret_cast<CPatcherError *>(pe); }
/*! * \brief Get the error information * * \note The returned ErrorCode is filled with valid data only if a * CAutoPatcher operation has failed. * * \note The returned ErrorCode should be freed with mbp_error_destroy() * when it is no longer needed. * * \param patcher CAutoPatcher object * * \return ErrorCode * * \sa AutoPatcher::error() */ /* enum ErrorCode */ int mbp_autopatcher_error(const CAutoPatcher *patcher) { CCASTAP(patcher); return static_cast<int>(ap->error()); }
/*! * \brief The autopatcher's identifier * * \note The returned string is dynamically allocated. It should be free()'d * when it is no longer needed. * * \param patcher CAutoPatcher object * \return AutoPatcher ID * * \sa AutoPatcher::id() */ char * mbpatcher_autopatcher_id(const CAutoPatcher *patcher) { CCASTAP(patcher); return mb::capi_str_to_cstr(ap->id()); }