#ifndef STRUCTUREAPPI_H
|
#define STRUCTUREAPPI_H
|
#include "AppPipeController.h"
|
#include <atomic>
|
#include <Ice/Ice.h>
|
#include "rpc/StructureApp.h"
|
|
class StructureAppI : public Structure::StructureApp{
|
|
public:
|
|
StructureAppI(int maxCount):currentCount(0),maxCount(maxCount)
|
{}
|
~StructureAppI(){
|
for(auto controller: controllers){
|
delete controller.second;
|
}
|
controllers.clear();
|
}
|
// StructureApp interface
|
public:
|
virtual Ice::Int addCamera(Ice::Int, const std::string &, const Ice::Current &) override;
|
virtual Ice::Int removeCamera(Ice::Int, const Ice::Current &) override;
|
virtual Ice::Int removeAll(const Ice::Current &) override;
|
virtual Ice::Int getMaxCamCount(const Ice::Current &) override;
|
virtual Ice::Int getCurrentCamCount(const Ice::Current &) override;
|
int addVedio(int index, std::string path, string state);
|
|
private:
|
std::map<int, AppPipeController*> controllers;
|
std::atomic<int> currentCount;
|
int maxCount;
|
// StructureApp interface
|
public:
|
virtual string getRtmp(Ice::Int, const Ice::Current &) override;
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // STRUCTUREAPPI_H
|