// SPDX-License-Identifier: Apache-2.0 // Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) // Licensed under the Apache License, Version 2.0 (see LICENSE file) // Official repository: https://github.com/ne-foss-org/nekernel #ifndef HEADERS_PROPERTY_H #define HEADERS_PROPERTY_H #include #include #include #define kCFMaxPropLen (256U) namespace CF { class CFString; class CFProperty; template class CFArray; /// ================================================================================ /// @brief handle to anything (number, ptr, string...) /// ================================================================================ using CFPropertyId = UIntPtr; /// ================================================================================ /// @brief User property class. /// @note /prop/foo or /prop/bar are properties. /// ================================================================================ class CFProperty final CF_OBJECT { public: CFProperty(CFRef guid, CFString& name, CFPropertyId value); ~CFProperty() override = default; public: CFProperty& operator=(const CFProperty&) = default; CFProperty(const CFProperty&) = default; Bool StringEquals(CFString& name); CFPropertyId& GetValue(); CFString& GetKey(); private: CFString* fName{nullptr}; CFPropertyId fValue{0UL}; CFRef fGUID{}; }; template using CFPropertyArray = CFArray; } // namespace CF #endif