app_logic.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Tencent is pleased to support the open source community by making Mars available.
  2. // Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
  3. // Licensed under the MIT License (the "License"); you may not use this file except in
  4. // compliance with the License. You may obtain a copy of the License at
  5. // http://opensource.org/licenses/MIT
  6. // Unless required by applicable law or agreed to in writing, software distributed under the License is
  7. // distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
  8. // either express or implied. See the License for the specific language governing permissions and
  9. // limitations under the License.
  10. /*
  11. * app_logic.h
  12. *
  13. * Created on: 2016/3/3
  14. * Author: caoshaokun
  15. */
  16. #ifndef APPCOMM_INTERFACE_APPCOMM_LOGIC_H_
  17. #define APPCOMM_INTERFACE_APPCOMM_LOGIC_H_
  18. #include <string>
  19. #include "mars/app/app.h"
  20. #include "mars/comm/comm_data.h"
  21. class AutoBuffer;
  22. namespace mars {
  23. namespace app {
  24. class Callback {
  25. public:
  26. virtual ~Callback() {};
  27. virtual bool GetProxyInfo(const std::string& _host, mars::comm::ProxyInfo& _proxy_info) { return false; }
  28. virtual std::string GetAppFilePath() = 0;
  29. virtual AccountInfo GetAccountInfo() = 0;
  30. virtual unsigned int GetClientVersion() = 0;
  31. virtual DeviceInfo GetDeviceInfo() = 0;
  32. };
  33. void SetCallback(Callback* const callback);
  34. }}
  35. #endif /* APPCOMM_INTERFACE_APPCOMM_LOGIC_H_ */