This commit was generated by cvs2svn to compensate for changes in r10,
[reactos.git] / reactos / include / ddk / obtypes.h
1 struct _DIRECTORY_OBJECT;
2
3 typedef struct _OBJECT_HANDLE_INFORMATION {
4 ULONG HandleAttributes;
5 ACCESS_MASK GrantedAccess;
6 } OBJECT_HANDLE_INFORMATION, *POBJECT_HANDLE_INFORMATION;
7
8 struct _OBJECT;
9
10 typedef struct _OBJECT_TYPE
11 {
12 /*
13 * PURPOSE: Name of the type
14 */
15 UNICODE_STRING TypeName;
16
17 /*
18 * PURPOSE: Total number of objects of this type
19 */
20 ULONG TotalObjects;
21
22 /*
23 * PURPOSE: Total number of handles of this type
24 */
25 ULONG TotalHandles;
26
27 /*
28 * PURPOSE: Maximum objects of this type
29 */
30 ULONG MaxObjects;
31
32 /*
33 * PURPOSE: Maximum handles of this type
34 */
35 ULONG MaxHandles;
36
37 /*
38 * PURPOSE: Paged pool charge
39 */
40 ULONG PagedPoolCharge;
41
42 /*
43 * PURPOSE: Nonpaged pool charge
44 */
45 ULONG NonpagedPoolCharge;
46
47 /*
48 * PURPOSE: Dumps the object
49 * NOTE: To be defined
50 */
51 VOID (*Dump)(VOID);
52
53 /*
54 * PURPOSE: Opens the object
55 * NOTE: To be defined
56 */
57 VOID (*Open)(VOID);
58
59 /*
60 * PURPOSE: Called to close an object if OkayToClose returns true
61 */
62 VOID (*Close)(VOID);
63
64 /*
65 * PURPOSE: Called to close an object if OkayToClose returns true
66 */
67 VOID (*Delete)(VOID);
68
69 /*
70 * PURPOSE: Called when an open attempts to open a file apparently
71 * residing within the object
72 */
73 VOID (*Parse)(VOID);
74
75 /*
76 */
77 VOID (*Security)(VOID);
78
79 /*
80 */
81 VOID (*QueryName)(VOID);
82
83 /*
84 * PURPOSE: Called when a process asks to close the object
85 */
86 VOID (*OkayToClose)(VOID);
87
88 } OBJECT_TYPE, *POBJECT_TYPE;
89
90
91 typedef struct _OBJECT
92 /*
93 * PURPOSE: Header for every object managed by the object manager
94 */
95 {
96 /*
97 * PURPOSE: Name of this entry
98 */
99 UNICODE_STRING name;
100
101 /*
102 * PURPOSE: Our entry in our parents list of subdirectory
103 */
104 LIST_ENTRY entry;
105
106 /*
107 * PURPOSE: Number of non-handle references to this object
108 */
109 ULONG RefCount;
110
111 /*
112 * PURPOSE: Number of handles opened to this object
113 */
114 ULONG HandleCount;
115
116 /*
117 * PURPOSE: Object type
118 * NOTE: This overlaps the first member of the object body
119 */
120 CSHORT Type;
121
122 /*
123 * PURPOSE: Object size
124 * NOTE: This overlaps the second member of the object body
125 */
126 CSHORT Size;
127
128 } OBJECT_HEADER, *POBJECT_HEADER;
129
130 /*
131 * PURPOSE: Defines an object
132 */
133 typedef struct _OBJECT_ATTRIBUTES
134 {
135 ULONG Length;
136
137 /*
138 * PURPOSE: Attributes of the object
139 */
140 ULONG Attributes;
141
142 SECURITY_DESCRIPTOR SecurityDescriptor;
143 // SecurityQualityOfService
144
145 struct _DIRECTORY_OBJECT* parent;
146 UNICODE_STRING name;
147 UNICODE_STRING path;
148
149 } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;