GW2RegisterReportFile
Hàm GW2RegisterReportFile đăng ký đường dẫn tệp nơi tệp nhật ký kỹ thuật sẽ được đặt. API này chỉ tạo tệp báo cáo cho các bản dựng gỡ lỗi của Glasswall Engine.
- C++
- C#
- Java
- Python
- JavaScript
Tóm tắt
Đối với phiên session, hàm GW2RegisterReportFile đăng ký tên của tệp nơi tệp nhật ký kỹ thuật sẽ được đặt. Tên là chuỗi được trỏ tới bởi reportFilePathName.
#include "glasswall.core2.api.h"
int GW2RegisterReportFile(Session session, const char *reportFilePathName);
Giá trị trả về
Trả về một giá trị enum GW2_RetStatus dạng số nguyên. Các số âm cho biết thất bại.
Tóm tắt
public int RegisterReportFile(
int session,
string reportFilePathName)
Giá trị trả về
Trả về một giá trị enum GW2_RetStatus dạng số nguyên. Các số âm cho biết thất bại.
Tóm tắt
import com.glasswall.core2javabridge.*;
public int GW2RegisterReportFile(int session, String reportFilePath) throws GlasswallException, NullPointerException
(Deprecated)
public int GW2RegisterReportFile(int session, byte[] reportFilePath) throws GlasswallException, NullPointerException
Mô tả
Các tham số của hàm GW2RegisterReportFile đã được cập nhật để sử dụng String thay cho byte[]. Hàm gốc đã bị ngừng dùng.
Giá trị trả về
Hàm GW2RegisterReportFile trả về một giá trị liệt kê GW2_RetStatus được chuyển đổi thành int. Giá trị sẽ là số âm nếu xảy ra lỗi. 0 cho biết thành công. Tham khảo API Overview/Return types để biết chi tiết.
Một ngoại lệ NullPointerException sẽ được ném ra nếu reportFilePath là null hoặc rỗng.
Một ngoại lệ GlasswallException sẽ được ném ra nếu session không hợp lệ, nếu không thể truy xuất reportFilePath, hoặc nếu không thể chuyển đổi reportFilePath sang UTF-8.
Tóm tắt
Đăng ký tên của tệp nơi tệp nhật ký kỹ thuật sẽ được đặt.
def register_report_file(self, session: int, output_file: str):
""" Register the report file path for the given session.
Args:
session (int): The session integer.
output_file (str): The file path of the report file.
Returns:
gw_return_object (glasswall.GwReturnObj): A GwReturnObj instance with the attributes 'session', 'output_file', 'status'.
"""
Giá trị trả về
gw_return_object (glasswall.GwReturnObj): Một thực thể GwReturnObj với các thuộc tính 'session', 'output_file', 'status'.
Tóm tắt
Hàm này đăng ký tên của tệp nơi tệp nhật ký kỹ thuật sẽ được đặt.
/**
* @param {number} session The ID of the session.
* @param {string} reportFilePathName The path of the file to be registered.
*/
GW2RegisterReportFile(session, reportFilePathName)
Giá trị trả về
Trả về một giá trị enum GW2_RetStatus dạng số nguyên. Các số âm cho biết thất bại.