Нет описания

IAgoraService.h 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // Agora SDK
  2. //
  3. // Copyright (c) 2019 Agora.io. All rights reserved.
  4. //
  5. #ifndef AGORA_SERVICE_H
  6. #define AGORA_SERVICE_H
  7. #include "AgoraBase.h"
  8. namespace agora {
  9. namespace rtc {
  10. class IRtcEngine;
  11. }
  12. namespace rtm {
  13. class IRtmService;
  14. }
  15. namespace base {
  16. struct AgoraServiceContext
  17. {
  18. };
  19. class IAgoraService
  20. {
  21. protected:
  22. virtual ~IAgoraService(){}
  23. public:
  24. virtual void release() = 0;
  25. /** Initializes the engine.
  26. @param context RtcEngine context.
  27. @return
  28. - 0: Success.
  29. - < 0: Failure.
  30. */
  31. virtual int initialize(const AgoraServiceContext& context) = 0;
  32. /** Retrieves the SDK version number.
  33. * @param build Build number.
  34. * @return The current SDK version in the string format. For example, 2.4.0
  35. */
  36. virtual const char* getVersion(int* build) = 0;
  37. virtual rtm::IRtmService* createRtmService() = 0;
  38. };
  39. } //namespace base
  40. } // namespace agora
  41. /** Gets the SDK version number.
  42. @param build Build number of the Agora SDK.
  43. @return
  44. - 0: Success.
  45. - < 0: Failure.
  46. */
  47. AGORA_API const char* AGORA_CALL getAgoraSdkVersion(int* build);
  48. /**
  49. * Creates the RtcEngine object and returns the pointer.
  50. * @param err Error code
  51. * @return returns Description of the error code
  52. */
  53. AGORA_API const char* AGORA_CALL getAgoraSdkErrorDescription(int err);
  54. /**
  55. * Creates the Agora Service object and returns the pointer.
  56. * @return returns Pointer of the Agora Service object
  57. */
  58. AGORA_API agora::base::IAgoraService* AGORA_CALL createAgoraService();
  59. AGORA_API int AGORA_CALL setAgoraSdkExternalSymbolLoader(void* (*func)(const char* symname));
  60. #endif