| | |
| | | #ifndef RTSPNATIVECODEC_REMOTEMETHODSERVER_H |
| | | #define RTSPNATIVECODEC_REMOTEMETHODSERVER_H |
| | | |
| | | #include <string> |
| | | #include <capnp/message.h> |
| | | #include <capnp/serialize-packed.h> |
| | | #include <capnp/ez-rpc.h> |
| | | #include "RemoteMethod.proto.h" |
| | | #include "RemoteMethod.capnp.h" |
| | | |
| | | class RtspFaceDetectClient :public RtspFaceDetect::Client{ |
| | | //C++模块中的client,用于发现人脸时通知java模块 |
| | | class RtspFaceDetectClient |
| | | { |
| | | public: |
| | | RtspFaceDetectClient(); |
| | | ~RtspFaceDetectClient(){}; |
| | | ::kj::WaitScope& getWaitScope(); |
| | | RtspFaceDetectClient(); |
| | | RtspFaceDetect::Client* getClient(); |
| | | ~RtspFaceDetectClient() {}; |
| | | |
| | | ::kj::WaitScope &getWaitScope(); |
| | | |
| | | capnp::EzRpcClient* getEzRpcClient(); |
| | | private: |
| | | capnp::EzRpcClient rpcClient; |
| | | RtspFaceDetect::Client* client; |
| | | capnp::EzRpcClient* rpcClient; |
| | | }; |
| | | |
| | | void startRemoteServer(); |
| | | RtspFaceDetectClient& getRtspFaceDetectClient(); |
| | | |
| | | class RtspFaceViewImpl final : public RtspFaceView::Server { |
| | | RtspFaceDetectClient* getRtspFaceDetectClient(); |
| | | |
| | | //C++模块中的服务端,用于响应java端的调用及传值 |
| | | class RtspFaceViewImpl final : public RtspFaceView::Server |
| | | { |
| | | public: |
| | | virtual ::kj::Promise<void> getFaceList(GetFaceListContext context) override; |
| | | virtual ::kj::Promise<void> getFaceList(GetFaceListContext context) override; |
| | | |
| | | virtual ::kj::Promise<void> getFaceImages(GetFaceImagesContext context) override; |
| | | virtual ::kj::Promise<void> getFaceImages(GetFaceImagesContext context) override; |
| | | |
| | | virtual ::kj::Promise<void> setFaceLabel(SetFaceLabelContext context) override; |
| | | virtual ::kj::Promise<void> setFaceLabel(SetFaceLabelContext context) override; |
| | | |
| | | private: |
| | | }; |
| | | |
| | | |
| | | |
| | | #endif //RTSPNATIVECODEC_REMOTEMETHODSERVER_H |