prod_cc/include/integration_service.hpp

91 lines
2.9 KiB
C++
Raw Normal View History

2026-07-13 03:03:59 +00:00
#ifndef IMS_INTEGRATION_SERVICE_HPP
#define IMS_INTEGRATION_SERVICE_HPP
#include "ims_types.hpp"
#include <memory>
#include <vector>
#include <functional>
namespace ims {
/// @brief 第三方系统集成服务类。
///
/// 提供标准化的接口注册与预留、第三方数据对接、定时/实时数据同步能力。
class IntegrationService {
public:
IntegrationService();
~IntegrationService();
// ==================== 标准化接口预留 (SRS-IMS_F-027) ====================
/**
* @brief
*
* @requirement(name="标准化接口预留", id="SRS-IMS_F-027")
* API 使
*/
bool registerInterface(const std::string& api_name,
const std::string& endpoint,
const std::string& method,
const std::string& description);
/**
* @brief
*
* @requirement(name="标准化接口预留", id="SRS-IMS_F-027")
*/
std::vector<std::string> listRegisteredInterfaces();
// ==================== 第三方数据对接 (SRS-IMS_F-028) ====================
/**
* @brief
*
* @requirement(name="第三方数据对接", id="SRS-IMS_F-028")
* ExchangeMessage
*/
std::vector<ExchangeMessage> importFromThirdParty(
const std::string& source_system,
const std::string& data_type);
/**
* @brief
*
* @requirement(name="第三方数据对接", id="SRS-IMS_F-028")
*
*/
bool pushToThirdParty(const std::string& target_system,
const ExchangeMessage& message);
// ==================== 数据同步 (SRS-IMS_F-029) ====================
/**
* @brief /
*
* @requirement(name="数据同步", id="SRS-IMS_F-029")
* /
*/
bool syncData(const std::string& partner_system,
const std::string& data_type,
bool full_sync);
/**
* @brief
*
* @requirement(name="数据同步", id="SRS-IMS_F-029")
*
*/
int32_t registerSyncTask(const std::string& partner_system,
const std::string& data_type,
int32_t interval_seconds,
std::function<bool()> sync_callback);
private:
struct Impl;
std::unique_ptr<Impl> pImpl_;
};
} // namespace ims
#endif // IMS_INTEGRATION_SERVICE_HPP