#ifndef __BUILDER_SCREENSHOTS_H__
#define __BUILDER_SCREENSHOTS_H__

#include "KMBuilderCache.h"
#include "KMBuilderConfigTypes.h"
#include "KMBuilderContext.h"
#include "KMBuilderUtils.h"
#include "common/KMLogger.h"

#include <gio/gio.h>
#include <json/json.h>
#include <ostree.h>
#include <yaml-cpp/yaml.h>

#include <algorithm>
#include <fstream>
#include <iostream>
#include <memory>
#include <sstream>
#include <string>
#include <system_error>
#include <variant>
#include <vector>

using namespace std;

/*
类名: KMBuilderScreenshots
功能: 用于处理保存快照过程
成员变量:
   - shared_ptr<ConfigData> m_pConfigData;       	        //ConfigData配置文件指针
   - shared_ptr<KMBuilderCache> m_pKMBuilderCache; 	        //KMBuilderCache指针
   - BuilderCache m_builderCache;               	        //BuilderCache结构体
   - KMBuilderModule *m_pBuilderModule; 			        //BuilderModule私有嵌套BuilderModuleData
   - shared_ptr<BuilderModuleData> m_pBuilderModuleData;	//BuilderModuleData指针
成员函数:
   - 省略
*/
class KMBuilderScreenshots
{
public:
    KMBuilderScreenshots(shared_ptr<KMBuilderCache> cache);
    virtual ~KMBuilderScreenshots();

public:
    /**
     * @brief : 开始执行Screenshots阶段
     * @return: true-成功; false-失败
     */
    bool saveScreenshots();

private:
    shared_ptr<ConfigData> m_pConfigData;               // ConfigData配置文件指针
    shared_ptr<KMBuilderCache> m_pKMBuilderCache;       // KMBuilderCache指针
    BuilderCache m_builderCache;                        // BuilderCache结构体
    KMBuilderModule *m_pBuilderModule;                  // BuilderModule私有嵌套BuilderModuleData
    shared_ptr<BuilderModuleData> m_pBuilderModuleData; // BuilderModuleData指针
};

#endif /* __BUILDER_SCREENSHOTS_H__ */