/** * @RDE_HEADER@ * ISM Handler Mounting Point Schedule * $Id$ * $HeadURL$ * $Author$ * Created by Iuliana Ojog, SLSE, 2016-11-26 */ #pragma once #include #include "base.h" //------------------------------------------------------------------------------------------------------------- namespace InfrastructureManagement { class ObjectMainSchedule; class MainHandler; class HandlerMainSchedule final : public Base , protected Interface::Fts::MainScheduleModifyRequestHandler , protected Interface::Fts::MainScheduleCopyRequestHandler , protected Interface::Fts::MainScheduleRemoveRequestHandler , protected Interface::Fts::MountingPointPlanModifyRequestHandler { Q_OBJECT public: explicit HandlerMainSchedule(MainHandler *mainHandler); ~HandlerMainSchedule(); bool init(); bool initByDbId(int dbId); std::vector getMountingPointPlans(int scheduleId) const; ObjectMainSchedule *getMainSchedule(int scheduleId) const { return m_objectMainScheduleMap.value(scheduleId); } QHash getMainScheduleMap() const { return m_objectMainScheduleMap; } private: void onMainScheduleModifyRequest(const rti::core::SampleIdentity &cookie, const MainScheduleModifyRequest &request) override final; Core::FunctionReplyObject mainScheduleCreate(const MainScheduleModifyRequest &request); Core::FunctionReplyObject mainScheduleModify(const MainScheduleModifyRequest &request); void onMainScheduleCopyRequest(const rti::core::SampleIdentity &cookie, const MainScheduleCopyRequest &request) override final; void onMainScheduleRemoveRequest(const rti::core::SampleIdentity &cookie, const Core::RemoveElementRequest &request) override final; void onMountingPointPlanModifyRequest(const rti::core::SampleIdentity &cookie, const MountingPointPlanModifyRequest &request) override final; Core::FunctionReplyObject mountingPointPlanModify(const MountingPointPlanModifyRequest &request); void onDbInsertedSchedule(const QVariant &id_); private: QHash m_objectMainScheduleMap; MainHandler *m_mainHandler; }; }