C API¶
Files¶
errorcode.h¶
Header defining all error codes of DRMLib.
Enums
-
enum
DRMLibErrorCode¶ Error code enum.
Values:
-
DRMLibOK= 0¶ Function returned successfully
-
DRMBadArg= 00001¶ Bad argument provided
-
DRMBadFormat= 00002¶ Bad format of provided input or config file
-
DRMExternFail= 00003¶ Fail happened in an external library
-
DRMBadUsage= 00004¶ Wrong usage of the DRMLib
-
DRMWSRespError= 10001¶ A malformed response has been received from Accelize WebService
-
DRMWSReqError= 10002¶ Failed during HTTP request to Accelize WebService
-
DRMWSError= 10003¶ Error returned from Accelize WebService
-
DRMWSMayRetry= 10004¶ Error with request to Accelize Webservice, retry advised
-
DRMCtlrError= 20001¶ An error happened on a command on the DRM controller
-
DRMLibFatal= 90001¶ Fatal error, unknown error (Please contact Accelize)
-
DRMLibAssert= 90002¶ Assertion failed internally (Please contact Accelize)
-
metering.h¶
Header for using MeteringSessionManager feature of the DRMLib.
- Note
- This C API is wrapping C++ API, please refer to C++ API
Typedefs
-
typedef struct MeteringSessionManager_s
MeteringSessionManager¶ Wrapper struct around C++ Accelize::DRMLib::MeteringSessionManager.
-
typedef int (*
ReadReg32ByOffsetHandler)(uint32_t, uint32_t *, void *user_p)¶ Wrapper typedef around C++ Accelize::DRMLib::MeteringSessionManager::ReadReg32ByOffsetHandler.
- Note
- user_p is the user pointer provided at construction to MeteringSessionManager_alloc
-
typedef int (*
WriteReg32ByOffsetHandler)(uint32_t, uint32_t, void *user_p)¶ Wrapper typedef around C++ Accelize::DRMLib::MeteringSessionManager::WriteReg32ByOffsetHandler.
- Note
- user_p is the user pointer provided at construction to MeteringSessionManager_alloc
-
typedef void (*
ErrorCallBackHandler)(const char *, void *user_p)¶ Wrapper typedef around C++ Accelize::DRMLib::MeteringSessionManager::ErrorCallBackHandler.
- Note
- user_p is the user pointer provided at construction to MeteringSessionManager_alloc
Functions
-
DRMLibErrorCode
MeteringSessionManager_alloc(MeteringSessionManager **p_m, const char *conf_file_path, const char *cred_file_path, ReadReg32ByOffsetHandler f_drm_read32, WriteReg32ByOffsetHandler f_drm_write32, ErrorCallBackHandler f_error_cb, void *user_p)¶ Wrapper typedef around C++ Accelize::DRMLib::MeteringSessionManager::MeteringSessionManager constructor.
- Parameters
**p_m: : pointer to a MeteringSessionManager pointer that will be set to the new constructed objectconf_file_pathcred_file_pathf_drm_read32f_drm_write32f_error_cb: : see C++ API documentationuser_p: : user pointer that will be passed to the callback functions
-
DRMLibErrorCode
MeteringSessionManager_free(MeteringSessionManager **p_m)¶ Wrapper typedef around C++ Accelize::DRMLib::MeteringSessionManager::~MeteringSessionManager destructor.
- Parameters
**p_m: : pointer to a MeteringSessionManager pointer that will be freed. After *p_m == NULL.
-
DRMLibErrorCode
MeteringSessionManager_start_session(MeteringSessionManager *m)¶ Wrapper typedef around C++ Accelize::DRMLib::MeteringSessionManager::start_session.
- Parameters
*m: : pointer to a MeteringSessionManager object
-
DRMLibErrorCode
MeteringSessionManager_stop_session(MeteringSessionManager *m)¶ Wrapper typedef around C++ Accelize::DRMLib::MeteringSessionManager::stop_session.
- Parameters
*m: : pointer to a MeteringSessionManager object
-
DRMLibErrorCode
MeteringSessionManager_pause_session(MeteringSessionManager *m)¶ Wrapper typedef around C++ Accelize::DRMLib::MeteringSessionManager::pause_session.
- Parameters
*m: : pointer to a MeteringSessionManager object
-
DRMLibErrorCode
MeteringSessionManager_resume_session(MeteringSessionManager *m)¶ Wrapper typedef around C++ Accelize::DRMLib::MeteringSessionManager::resume_session.
- Parameters
*m: : pointer to a MeteringSessionManager object
-
DRMLibErrorCode
MeteringSessionManager_auto_start_session(MeteringSessionManager *m)¶ Wrapper typedef around C++ Accelize::DRMLib::MeteringSessionManager::auto_start_session.
- Parameters
*m: : pointer to a MeteringSessionManager object
-
DRMLibErrorCode
MeteringSessionManager_dump_drm_hw_report(MeteringSessionManager *m)¶ Wrapper typedef around C++ Accelize::DRMLib::MeteringSessionManager::dump_drm_hw_report.
- Parameters
*m: : pointer to a MeteringSessionManager object