chenke
2017-08-09 784f977cc7f9b9aad8cc3528a4f2026c1f686a0a
VisitFace/RtspNativeCodec/app/src/main/cpp/RemoteFuncServer.h
@@ -1,46 +1,37 @@
//
// Created by pansen on 2017/8/4.
//
#ifndef RTSPNATIVECODEC_REMOTEMETHODSERVER_H
#define RTSPNATIVECODEC_REMOTEMETHODSERVER_H
#include <iostream>
#include <capnp/ez-rpc.h>
#include "RemoteMethod.proto.h"
#include "CameraWrapperServer.h"
const RtspFaceDetectClient& getRtspFaceDetectClient();
class RtspFaceDetectClient{
public:
    RtspFaceDetectClient();
    ~RtspFaceDetectClient();
    void fireFaceCountListener(int cameraIndex, int faceCount);
private:
    capnp::EzRpcClient rpcClient;
    RtspFaceDetect::Client client;
};
class RtspFaceViewImpl final : public RtspFaceView::Server {
public:
    RtspFaceViewImpl();
    ~RtspFaceViewImpl();
    virtual ::kj::Promise<void> getFaceList(GetFaceListContext context) override;
    virtual ::kj::Promise<void> getFaceImages(GetFaceImagesContext context) override;
    virtual ::kj::Promise<void> setFaceLabel(SetFaceLabelContext context) override ;
private:
    CameraWrapper cameraWrapper;
};
#endif //RTSPNATIVECODEC_REMOTEMETHODSERVER_H
//
// Created by pansen on 2017/8/4.
//
#ifndef RTSPNATIVECODEC_REMOTEMETHODSERVER_H
#define RTSPNATIVECODEC_REMOTEMETHODSERVER_H
#include <string>
#include <capnp/ez-rpc.h>
#include "RemoteMethod.proto.h"
class RtspFaceDetectClient :public RtspFaceDetect::Client{
public:
    RtspFaceDetectClient();
    ~RtspFaceDetectClient(){};
    ::kj::WaitScope& getWaitScope();
private:
    capnp::EzRpcClient rpcClient;
};
void startRemoteServer();
RtspFaceDetectClient& getRtspFaceDetectClient();
class RtspFaceViewImpl final : public RtspFaceView::Server {
public:
    virtual ::kj::Promise<void> getFaceList(GetFaceListContext context) override;
    virtual ::kj::Promise<void> getFaceImages(GetFaceImagesContext context) override;
    virtual ::kj::Promise<void> setFaceLabel(SetFaceLabelContext context) override;
private:
};
#endif //RTSPNATIVECODEC_REMOTEMETHODSERVER_H