10#ifndef __IO_FILE_IMPORT_H__
11#define __IO_FILE_IMPORT_H__
15#include "dsp/position.h"
16#include "utils/types.h"
29# define FILE_IMPORT_TYPE (file_import_get_type ())
30G_DECLARE_FINAL_TYPE (FileImport, file_import, Z, FILE_IMPORT, GObject);
35 FileImportInfo () =
default;
37 unsigned int track_name_hash,
41 : track_name_hash_ (track_name_hash), lane_ (lane),
42 pos_ (std::move (pos)), track_idx_ (track_idx)
47 unsigned int track_name_hash_;
62using FileImport =
struct _FileImport
64 GObject parent_instance;
70 std::vector<std::shared_ptr<Region>> regions;
82 std::unique_ptr<FileImportInfo> import_info;
91file_import_new (
const std::string &filepath,
const FileImportInfo * import_nfo);
105 GCancellable * cancellable,
106 GAsyncReadyCallback callback,
107 gpointer callback_data);
109std::vector<std::shared_ptr<Region>>
110file_import_sync (FileImport * self, GError ** error);
119std::vector<std::shared_ptr<Region>>
120file_import_finish (FileImport * self, GAsyncResult * result, GError ** error);