ColinLeeo commented on code in PR #418:
URL: https://github.com/apache/tsfile/pull/418#discussion_r1973077554


##########
cpp/src/cwrapper/tsfile_cwrapper.h:
##########
@@ -109,94 +118,246 @@ typedef void* TsRecord;
 typedef void* ResultSet;
 
 typedef int32_t ERRNO;
-typedef int64_t timestamp;
+typedef int64_t Timestamp;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+/*--------------------------TsFile Reader and Writer------------------------ */
+
+/**
+ * @brief Creates a file for writing.
+ *
+ * @param pathname     Target file path to create.
+ * @param err_code     [out] E_OK(0), or check error code in errno_define.h.
+ *
+ * @return WriteFile Valid handle on success.
+ *
+ * @note Call free_write_file() to release resources.
+ */
+
+WriteFile write_file_new(const char* pathname, ERRNO* err_code);
+
+/**
+ * @brief Creates a TsFileWriter for writing TsFiles.
+ *
+ * @param file     Target file where the table data will be written.
+ * @param schema       Table schema definition.
+ *                     - Ownership: Caller must free it after writer creating.
+ * @param err_code     [out] E_OK(0), or check error code in errno_define.h.
+ *
+ * @return TsFileWriter Valid handle on success, NULL on failure.
+ *
+ * @note Call tsfile_writer_close() to release resources.
+ */
+TsFileWriter tsfile_writer_new(WriteFile file, TableSchema* schema,
+                               ERRNO* err_code);
+
+/**
+ * @brief Creates a TsFileReader for reading TsFiles.

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@tsfile.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to