summaryrefslogtreecommitdiffhomepage
path: root/Private/ObjectKit/ObjectKit.hxx
blob: 384bf145447dcafcef5a6767f9187601b16c6f93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* -------------------------------------------

    Copyright Mahrouss Logic

------------------------------------------- */

#pragma once

#include <NewKit/Defines.hpp>
#include <CFKit/GUIDWrapper.hpp>

#define kObjectGlobalNamespace ":\\"

enum {
  kObjectTypeGeneric,
  kObjectTypeFile,
  kObjectTypeDevice,
  kObjectTypeNetwork,
  kObjectTypeInvalid,
  kObjectTypeCount = 5,
};

/// \brief Object handle.
/// \author Amlal El Mahrouss
typedef struct Object final {
  NewOS::Char ObjectName[255];
  NewOS::Int32 ObjectType;
  NewOS::Char ObjectNamespace[255];

  NewOS::Void(*Release)(struct Object* Self);
  NewOS::IntPtr(*Invoke)(struct Object* Self, NewOS::Int32 Sel, ...);
  NewOS::Void(*Query)(struct Object* Self, NewOS::VoidPtr* Dst, NewOS::SizeT SzDst, NewOS::XRN::GUIDSequence GuidOf);
} *ObjectRef;

#define object_cast reinterpret_cast<ObjectRef>