IAppClient.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0-only
  2. *
  3. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. */
  5. /** @cond */
  6. #pragma once
  7. #include "smcinvoke_object.h"
  8. #define IAppClient_ERROR_APP_NOT_FOUND INT32_C(10)
  9. #define IAppClient_ERROR_APP_RESTART_FAILED INT32_C(11)
  10. #define IAppClient_ERROR_APP_UNTRUSTED_CLIENT INT32_C(12)
  11. #define IAppClient_ERROR_CLIENT_CRED_PARSING_FAILURE INT32_C(13)
  12. #define IAppClient_ERROR_APP_LOAD_FAILED INT32_C(14)
  13. #define IAppClient_OP_getAppObject 0
  14. static inline int32_t
  15. IAppClient_release(struct Object self)
  16. {
  17. return Object_invoke(self, Object_OP_release, 0, 0);
  18. }
  19. static inline int32_t
  20. IAppClient_retain(struct Object self)
  21. {
  22. return Object_invoke(self, Object_OP_retain, 0, 0);
  23. }
  24. static inline int32_t
  25. IAppClient_getAppObject(struct Object self, const void *appDistName_ptr, size_t appDistName_len,struct Object *obj_ptr)
  26. {
  27. int32_t result;
  28. union ObjectArg a[2];
  29. a[0].bi = (struct ObjectBufIn) { appDistName_ptr, appDistName_len * 1 };
  30. result = Object_invoke(self, IAppClient_OP_getAppObject, a, ObjectCounts_pack(1, 0, 0, 1));
  31. *obj_ptr = a[1].o;
  32. return result;
  33. }