@@ -27,37 +27,55 @@ def fbs_ref_new(client, channel_address, req_slice, req_offset):
2727 return res
2828
2929 @staticmethod
30- def fbs_ref_get_from_db (id ):
30+ def fbs_ref_get_from_db (ptr , size ):
3131 errorSize = ctypes .c_int (0 )
3232 sError = ctypes .c_wchar_p ()
33- res = capi .dll .FbsRef_getFromDB (id , ctypes .byref (utils .to_int32 (errorSize )), ctypes .byref (sError ))
33+ res = capi .dll .FbsRef_getFromDB (ptr , size , ctypes .byref (utils .to_int32 (errorSize )), ctypes .byref (sError ))
3434 if errorSize .value != 0 :
3535 raise errors .DPFServerException (sError .value )
3636 return res
3737
3838 @staticmethod
39- def fbs_ref_get_id (obj ):
39+ def any_get_as_fbs_ref (obj , client , channel_address , req_slice , req_offset ):
4040 errorSize = ctypes .c_int (0 )
4141 sError = ctypes .c_wchar_p ()
42- res = capi .dll .FbsRef_getID (obj ._internal_obj if obj is not None else None , ctypes .byref (utils .to_int32 (errorSize )), ctypes .byref (sError ))
42+ res = capi .dll .Any_getAs_FbsRef (obj ._internal_obj if obj is not None else None , client , utils . to_char_ptr ( channel_address ), req_slice , req_offset , ctypes .byref (utils .to_int32 (errorSize )), ctypes .byref (sError ))
4343 if errorSize .value != 0 :
4444 raise errors .DPFServerException (sError .value )
4545 return res
4646
4747 @staticmethod
48- def any_get_as_fbs_ref ( obj , client , channel_address , req_slice , req_offset ):
48+ def fbs_ref_start_or_get_thread_server ( get_existing , ip , port , address ):
4949 errorSize = ctypes .c_int (0 )
5050 sError = ctypes .c_wchar_p ()
51- res = capi .dll .Any_getAs_FbsRef ( obj . _internal_obj if obj is not None else None , client , utils .to_char_ptr (channel_address ), req_slice , req_offset , ctypes .byref (utils .to_int32 (errorSize )), ctypes .byref (sError ))
51+ res = capi .dll .FbsRef_StartOrGetThreadServer ( get_existing , utils .to_char_ptr (ip ), utils . to_int32 ( port ), utils . to_char_ptr ( address ) , ctypes .byref (utils .to_int32 (errorSize )), ctypes .byref (sError ))
5252 if errorSize .value != 0 :
5353 raise errors .DPFServerException (sError .value )
5454 return res
5555
5656 @staticmethod
57- def fbs_ref_start_or_get_thread_server ( get_existing , ip , port , address ):
57+ def fbs_get_bytes_buffer_from_slice ( req_slice , req_offset , size_out ):
5858 errorSize = ctypes .c_int (0 )
5959 sError = ctypes .c_wchar_p ()
60- res = capi .dll .FbsRef_StartOrGetThreadServer (get_existing , utils .to_char_ptr (ip ), utils .to_int32 (port ), utils .to_char_ptr (address ), ctypes .byref (utils .to_int32 (errorSize )), ctypes .byref (sError ))
60+ res = capi .dll .Fbs_GetBytesBufferFromSlice (req_slice , req_offset , size_out , ctypes .byref (utils .to_int32 (errorSize )), ctypes .byref (sError ))
61+ if errorSize .value != 0 :
62+ raise errors .DPFServerException (sError .value )
63+ return res
64+
65+ @staticmethod
66+ def fbs_delete_channel (client ):
67+ errorSize = ctypes .c_int (0 )
68+ sError = ctypes .c_wchar_p ()
69+ res = capi .dll .Fbs_DeleteChannel (client , ctypes .byref (utils .to_int32 (errorSize )), ctypes .byref (sError ))
70+ if errorSize .value != 0 :
71+ raise errors .DPFServerException (sError .value )
72+ return res
73+
74+ @staticmethod
75+ def fbs_delete_slice (req_slice ):
76+ errorSize = ctypes .c_int (0 )
77+ sError = ctypes .c_wchar_p ()
78+ res = capi .dll .Fbs_DeleteSlice (req_slice , ctypes .byref (utils .to_int32 (errorSize )), ctypes .byref (sError ))
6179 if errorSize .value != 0 :
6280 raise errors .DPFServerException (sError .value )
6381 return res
0 commit comments