Procházet zdrojové kódy

Z991239-2278 #comment other: 指纹实体 client def server文件新增接口

翟俊伟80258120 před 4 roky
rodič
revize
3d325c41c2

+ 87 - 0
Module/mod_FingerPrint/FingerPrint_client_g.h

@@ -183,6 +183,93 @@ public:
 		return Error;
 	}
 
+	ErrorCodeEnum GetImageAndFeatureEx(FingerPrintService_GetImageAndFeatureEx_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		return pFunc->AsyncRequest(FingerPrintService_Method_GetImageAndFeatureEx, FingerPrintService_MethodSignature_GetImageAndFeatureEx, Buf, spAsyncWait, dwTimeout);
+	}
+	ErrorCodeEnum GetImageAndFeatureEx(FingerPrintService_GetImageAndFeatureEx_Req &Req, FingerPrintService_GetImageAndFeatureEx_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetImageAndFeatureEx(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum GetImageAndFeatureEx(FingerPrintService_GetImageAndFeatureEx_Req &Req, FingerPrintService_GetImageAndFeatureEx_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetImageAndFeatureEx(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum GetFingerPrint(FingerPrintService_GetFingerPrint_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		return pFunc->AsyncRequest(FingerPrintService_Method_GetFingerPrint, FingerPrintService_MethodSignature_GetFingerPrint, Buf, spAsyncWait, dwTimeout);
+	}
+	ErrorCodeEnum GetFingerPrint(FingerPrintService_GetFingerPrint_Req &Req, FingerPrintService_GetFingerPrint_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetFingerPrint(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum GetFingerPrint(FingerPrintService_GetFingerPrint_Req &Req, FingerPrintService_GetFingerPrint_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetFingerPrint(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum GenerateTemplate(FingerPrintService_GenerateTemplate_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		return pFunc->AsyncRequest(FingerPrintService_Method_GenerateTemplate, FingerPrintService_MethodSignature_GenerateTemplate, Buf, spAsyncWait, dwTimeout);
+	}
+	ErrorCodeEnum GenerateTemplate(FingerPrintService_GenerateTemplate_Req &Req, FingerPrintService_GenerateTemplate_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GenerateTemplate(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum GenerateTemplate(FingerPrintService_GenerateTemplate_Req &Req, FingerPrintService_GenerateTemplate_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GenerateTemplate(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
 
 	bool SafeDelete()
 	{

+ 84 - 0
Module/mod_FingerPrint/FingerPrint_def_g.h

@@ -19,6 +19,9 @@ namespace FingerPrint {
 #define FingerPrintService_Method_Match 4
 #define FingerPrintService_Method_GetDevStatus 5
 #define FingerPrintService_Method_GetDevInfo 65535
+#define FingerPrintService_Method_GetImageAndFeatureEx 6
+#define FingerPrintService_Method_GetFingerPrint 7
+#define FingerPrintService_Method_GenerateTemplate 8
 
 #define FingerPrintService_MethodSignature_GetImageAndFeature 248238486
 #define FingerPrintService_MethodSignature_CancelRegister -1073046765
@@ -27,6 +30,9 @@ namespace FingerPrint {
 #define FingerPrintService_MethodSignature_Match 1103958687
 #define FingerPrintService_MethodSignature_GetDevStatus -1933239559
 #define FingerPrintService_MethodSignature_GetDevInfo -70806533
+#define FingerPrintService_MethodSignature_GetImageAndFeatureEx 86600716
+#define FingerPrintService_MethodSignature_GetFingerPrint -2051396936
+#define FingerPrintService_MethodSignature_GenerateTemplate 1610871029
 
 struct FingerPrintService_GetImageAndFeature_Req
 {
@@ -148,6 +154,84 @@ struct FingerPrintService_GetDevInfo_Ans
 
 };
 
+struct FingerPrintService_GetImageAndFeatureEx_Req
+{
+	int times;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & times;
+	}
+
+};
+
+struct FingerPrintService_GetImageAndFeatureEx_Ans
+{
+	CSimpleStringA imageName;
+	CSimpleStringA feature;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & imageName & feature & reserved1 & reserved2;
+	}
+
+};
+
+struct FingerPrintService_GetFingerPrint_Req
+{
+	int times;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & times & reserved1 & reserved2;
+	}
+
+};
+
+struct FingerPrintService_GetFingerPrint_Ans
+{
+	CSimpleStringA imageName;
+	CSimpleStringA feature;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & imageName & feature & reserved1 & reserved2;
+	}
+
+};
+
+struct FingerPrintService_GenerateTemplate_Req
+{
+	CAutoArray<int> FingerIDList;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & FingerIDList & reserved1 & reserved2;
+	}
+
+};
+
+struct FingerPrintService_GenerateTemplate_Ans
+{
+	CSimpleStringA templateFeature;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & templateFeature & reserved1 & reserved2;
+	}
+
+};
+
 
 ///////////////////////////
 

+ 75 - 0
Module/mod_FingerPrint/FingerPrint_server_g.h

@@ -79,6 +79,27 @@ public:
 				Error = Error_MethodSignatureFailed;
 			}
 			break;
+		case FingerPrintService_Method_GetImageAndFeatureEx:
+			if (dwSignature == FingerPrintService_MethodSignature_GetImageAndFeatureEx) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case FingerPrintService_Method_GetFingerPrint:
+			if (dwSignature == FingerPrintService_MethodSignature_GetFingerPrint) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case FingerPrintService_Method_GenerateTemplate:
+			if (dwSignature == FingerPrintService_MethodSignature_GenerateTemplate) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
 		default:
 			Error = Error_MethodNotFound;
 			break;
@@ -125,6 +146,21 @@ public:
 				Error = Error_MethodSignatureFailed;
 			}
 			break;
+		case FingerPrintService_Method_GetImageAndFeatureEx:
+			if (dwSignature != FingerPrintService_MethodSignature_GetImageAndFeatureEx) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case FingerPrintService_Method_GetFingerPrint:
+			if (dwSignature != FingerPrintService_MethodSignature_GetFingerPrint) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case FingerPrintService_Method_GenerateTemplate:
+			if (dwSignature != FingerPrintService_MethodSignature_GenerateTemplate) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
 		default:
 			Error = Error_MethodNotFound;
 			break;
@@ -167,6 +203,21 @@ public:
 	/// override by user
 	}
 
+	virtual void Handle_GetImageAndFeatureEx(SpReqAnsContext<FingerPrintService_GetImageAndFeatureEx_Req, FingerPrintService_GetImageAndFeatureEx_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFingerPrint_Req, FingerPrintService_GetFingerPrint_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_GenerateTemplate(SpReqAnsContext<FingerPrintService_GenerateTemplate_Req, FingerPrintService_GenerateTemplate_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
 	virtual void OnRequest(CSmartPointer<ITransactionContext> pTransactionContext)
 	{
 		CAutoBuffer Buf;
@@ -239,6 +290,30 @@ public:
 						Handle_GetDevInfo(ctx);
 					}
 					break;
+				case FingerPrintService_Method_GetImageAndFeatureEx:
+					{
+						SpReqAnsContext<FingerPrintService_GetImageAndFeatureEx_Req,FingerPrintService_GetImageAndFeatureEx_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<FingerPrintService_GetImageAndFeatureEx_Req,FingerPrintService_GetImageAndFeatureEx_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						Handle_GetImageAndFeatureEx(ctx);
+					}
+					break;
+				case FingerPrintService_Method_GetFingerPrint:
+					{
+						SpReqAnsContext<FingerPrintService_GetFingerPrint_Req,FingerPrintService_GetFingerPrint_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<FingerPrintService_GetFingerPrint_Req,FingerPrintService_GetFingerPrint_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						Handle_GetFingerPrint(ctx);
+					}
+					break;
+				case FingerPrintService_Method_GenerateTemplate:
+					{
+						SpReqAnsContext<FingerPrintService_GenerateTemplate_Req,FingerPrintService_GenerateTemplate_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<FingerPrintService_GenerateTemplate_Req,FingerPrintService_GenerateTemplate_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						Handle_GenerateTemplate(ctx);
+					}
+					break;
 				default:
 					assert(0);
 					break;