miqt/qt6/gen_qlockfile.h

41 lines
1.0 KiB
C
Raw Normal View History

#pragma once
#ifndef MIQT_QT6_GEN_QLOCKFILE_H
#define MIQT_QT6_GEN_QLOCKFILE_H
2024-10-20 05:21:03 +00: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 04:15:57 +00:00
QLockFile* QLockFile_new(struct miqt_string fileName);
2024-10-20 05:21:03 +00: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);
2024-11-19 06:29:06 +00:00
void QLockFile_Delete(QLockFile* self, bool isSubclass);
2024-10-20 05:21:03 +00:00
#ifdef __cplusplus
} /* extern C */
#endif
#endif