#ifndef INC_PLCD_PROCESS_H #define INC_PLCD_PROCESS_H /* Cleopatre project {{{ * * Copyright (C) 2013 MStar Semiconductor * * <<>> * * }}} */ /** * \file devkit/plcd/inc/plcd_process.h * \ingroup plcd */ #include "plcd_ctx.h" #include "libmme.h" #include "libspid.h" /** * Process reception of a DRV_STA_STATUS.IND MME from AV / EoC stack. * * \param ctx plcd context * \param indication_ctx MME context of DRV_STA_STATUS.IND * \return -1 on error, 0 otherwise */ int plcd_stack_event_status ( plcd_ctx_t *ctx, mme_ctx_t *indication_ctx); /** * Process reception of a DRV_STA_SET_U_STA_HFID.IND * or DRV_STA_SET_AVLN_HFID.IND MME from AV / EoC stack. * * \param ctx plcd context * \param indication_ctx MME context of DRV_STA_SET_xxx_HFID.IND * \return -1 on error, 0 otherwise */ int plcd_stack_event_hfid ( plcd_ctx_t *ctx, mme_ctx_t *indication_ctx); /** * Process reception of a DRV_STA_SET_KEY.IND from AV / EoC stack. * * \param ctx plcd context * \param indication_ctx MME context of DRV_STA_SET_KEY.IND * \return -1 on error, 0 otherwise */ int plcd_stack_event_key ( plcd_ctx_t *ctx, mme_ctx_t *indication_ctx); /** * Process a modification of NMK, NID or SL in hpav.conf file, * following a user action such as NPW update via spidapp. * * \param ctx plcd context * \param nmk_str the new NMK * \param nid_str the new NID * \param sl_str the new SL * \return -1 on error, 0 otherwise */ int plcd_handle_user_key ( plcd_ctx_t *ctx, const char *nmk_str, const char *nid_str, const char *sl_str); /** * Process a modification of SC_BUTTON in hpav.info file, * following a user action such as pressing the SC button. * * \param ctx plcd context * \param status the new association status * \param is_sc the new SC status * \param is_sc_button the new SC button status * \return -1 on error, 0 otherwise */ int plcd_handle_user_sc ( plcd_ctx_t *ctx, const char *status, libspid_boolean_t is_sc, libspid_boolean_t is_sc_button, const char *sl_str); /** * This function is called after reception of a SIGHUP by PLCD signal handler. * Check which information has changed in which file, * and depending on this information, call the appropriate processing function. * * \param ctx plcd context */ void plcd_process_signal (plcd_ctx_t *ctx); #endif /* INC_PLCD_PROCESS_H */