NeKernel dev
Loading...
Searching...
No Matches
IndexableProperty.h
Go to the documentation of this file.
1/* ========================================
2
3 Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
4
5======================================== */
6
7#pragma once
8
9#include <CFKit/Property.h>
11#include <KernelKit/DriveMgr.h>
12
13#define kIndexerCatalogNameLength (256U)
14#define kIndexerClaimed (0xCF)
15#define kIndexerUnclaimed (0xCA)
16
17namespace Kernel {
18namespace Indexer {
19 struct Index final {
20 public:
23 };
24
25 class IndexableProperty final : public Property {
26 public:
27 explicit IndexableProperty() : Property() {
29 strProp += "/prop/indexable";
30
31 this->GetKey() = strProp;
32 }
33
34 ~IndexableProperty() override = default;
35
37
38 public:
39 Index& Leak();
40
41 public:
42 Void AddFlag(UInt16 flag);
44 UInt16 HasFlag(UInt16 flag);
45
46 private:
49 };
50
56 Void fs_index_file(const Char* filename, SizeT filenameLen, IndexableProperty& indexer);
57} // namespace Indexer
58} // namespace Kernel
#define NE_COPY_DEFAULT(KLASS)
Definition Detail.h:17
Drive Manager.
#define kDriveNameLen
Definition DriveMgr.h:26
#define kIndexerCatalogNameLength
Definition IndexableProperty.h:13
KBasicString & GetKey()
Gets the key (name) of property.
Definition Property.cc:31
Property()
Constructor.
UInt32 fFlags
Definition IndexableProperty.h:48
UInt16 HasFlag(UInt16 flag)
Definition IndexableProperty.cc:33
Index fIndex
Definition IndexableProperty.h:47
~IndexableProperty() override=default
Void RemoveFlag(UInt16 flag)
Definition IndexableProperty.cc:29
IndexableProperty()
Definition IndexableProperty.h:27
Index & Leak()
Definition IndexableProperty.cc:21
Void AddFlag(UInt16 flag)
Definition IndexableProperty.cc:25
Kernel string class, not dynamic.
Definition KString.h:20
Definition IndexableProperty.h:18
Void fs_index_file(const Char *filename, SizeT filenameLen, IndexableProperty &indexer)
Index a file into the indexer instance.
Definition IndexableProperty.cc:42
UPS inline definitions.
Definition Device.h:12
char Char
Definition Config.h:51
void Void
Definition Config.h:87
__UINT16_TYPE__ UInt16
Definition Config.h:40
__SIZE_TYPE__ SizeT
Definition Config.h:60
__UINT32_TYPE__ UInt32
Definition Config.h:44
#define kMaxPropLen
Definition Property.h:16
Definition IndexableProperty.h:19
Char Drive[kDriveNameLen]
Definition IndexableProperty.h:21
Char Path[kIndexerCatalogNameLength]
Definition IndexableProperty.h:22