2024-11-17 19:21:37 +13:00
|
|
|
#pragma once
|
|
|
|
#ifndef MIQT_QT6_GEN_QLOCKFILE_H
|
|
|
|
#define MIQT_QT6_GEN_QLOCKFILE_H
|
2024-10-20 18:21:03 +13:00
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
|
|
|
|
|
|
#include "../libmiqt/libmiqt.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
class QLockFile;
|
|
|
|
#else
|
|
|
|
typedef struct QLockFile QLockFile;
|
|
|
|
#endif
|
|
|
|
|
2024-12-07 17:15:57 +13:00
|
|
|
QLockFile* QLockFile_new(struct miqt_string fileName);
|
2025-02-01 13:45:16 +13:00
|
|
|
struct miqt_string QLockFile_fileName(const QLockFile* self);
|
|
|
|
bool QLockFile_lock(QLockFile* self);
|
|
|
|
bool QLockFile_tryLock(QLockFile* self);
|
|
|
|
void QLockFile_unlock(QLockFile* self);
|
|
|
|
void QLockFile_setStaleLockTime(QLockFile* self, int staleLockTime);
|
|
|
|
int QLockFile_staleLockTime(const QLockFile* self);
|
|
|
|
bool QLockFile_isLocked(const QLockFile* self);
|
|
|
|
bool QLockFile_removeStaleLockFile(QLockFile* self);
|
|
|
|
int QLockFile_error(const QLockFile* self);
|
|
|
|
bool QLockFile_tryLock1(QLockFile* self, int timeout);
|
|
|
|
void QLockFile_delete(QLockFile* self);
|
2024-10-20 18:21:03 +13:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern C */
|
2025-02-01 13:45:16 +13:00
|
|
|
#endif
|
2024-10-20 18:21:03 +13:00
|
|
|
|
|
|
|
#endif
|