joylink_agent_devs.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #ifndef __JD_AGENT_DEVS_H_
  2. #define __JD_AGENT_DEVS_H_
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6. #ifdef __cplusplus
  7. extern "C"{
  8. #endif /* __cplusplus */
  9. #include "joylink.h"
  10. #include "joylink_agent.h"
  11. #define AGENT_DEV_MAX (10)
  12. /**
  13. * brief:
  14. *
  15. * @Returns:
  16. */
  17. E_JLRetCode_t
  18. joylink_agent_devs_load(void);
  19. /**
  20. * brief:
  21. *
  22. * @Param: pad
  23. *
  24. * @Returns:
  25. */
  26. E_JLRetCode_t
  27. joylink_agent_dev_add(char feedid[JL_MAX_FEEDID_LEN],
  28. char ackey[JL_MAX_ACKEY_LEN]);
  29. /**
  30. * brief:
  31. *
  32. * @Param: feedid
  33. *
  34. * @Returns:
  35. */
  36. E_JLRetCode_t
  37. joylink_agent_dev_del(char *feedid);
  38. /**
  39. * brief:
  40. *
  41. * @Param: pad
  42. *
  43. * @Returns:
  44. */
  45. E_JLRetCode_t
  46. joylink_agent_dev_upd(char *feedid, AgentDev_t *pad);
  47. /**
  48. * brief:
  49. *
  50. * @Param: feedid
  51. * @Param: o_pad
  52. *
  53. * @Returns:
  54. */
  55. AgentDev_t *
  56. joylink_agent_dev_get(char *feedid);
  57. /**
  58. * brief:
  59. *
  60. * @Param: fds[AGENT_DEV_MAX]
  61. *
  62. * @Returns:
  63. */
  64. int
  65. joylink_agent_devs_get_fds(int fds[AGENT_DEV_MAX]);
  66. /**
  67. * brief:
  68. *
  69. * @Param: fd
  70. *
  71. * @Returns:
  72. */
  73. AgentDev_t *
  74. joylink_agent_get_dev_by_fd(int fd);
  75. /**
  76. * brief:
  77. *
  78. * @Param: fd
  79. * @Param: feedid[JL_MAX_FEEDID_LEN]
  80. *
  81. * @Returns:
  82. */
  83. E_JLRetCode_t
  84. joylink_agent_get_feedid_by_fd(int fd, char feedid[JL_MAX_FEEDID_LEN]);
  85. /**
  86. * brief:
  87. *
  88. * @Param: fd
  89. *
  90. * @Returns:
  91. */
  92. E_JLRetCode_t
  93. joylink_agent_dev_clear_fd_by_fd(int fd);
  94. #ifdef __cplusplus
  95. }
  96. #endif /* __cplusplus */
  97. #endif