libgpo: prefix some more calls with gpext_.
[Samba.git] / libgpo / gpext / gpext.h
blobc8024a25e863b6cbd05391450a5c3b86cb5a61ff
1 /*
2 * Unix SMB/CIFS implementation.
3 * Group Policy Support
4 * Copyright (C) Guenther Deschner 2007-2008
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #ifndef __GPEXT_H__
21 #define __GPEXT_H__
23 #include "librpc/gen_ndr/winreg.h"
25 #define KEY_WINLOGON_GPEXT_PATH "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\GPExtensions"
27 #define SAMBA_SUBSYSTEM_GPEXT "gpext"
29 #define SMB_GPEXT_INTERFACE_VERSION 1
31 struct gp_extension {
32 struct GUID *guid;
33 const char *name;
34 struct gp_extension_methods *methods;
35 struct gp_extension *prev, *next;
38 struct gp_extension_reg_table {
39 const char *val;
40 enum winreg_Type type;
41 const char *data;
44 struct gp_extension_reg_entry {
45 const char *value;
46 struct registry_value *data;
49 struct gp_extension_reg_info_entry {
50 struct GUID guid;
51 size_t num_entries;
52 struct gp_extension_reg_entry *entries;
55 struct gp_extension_reg_info {
56 size_t num_entries;
57 struct gp_extension_reg_info_entry *entries;
60 struct gp_extension_methods {
62 NTSTATUS (*initialize)(TALLOC_CTX *mem_ctx);
64 NTSTATUS (*process_group_policy)(TALLOC_CTX *mem_ctx,
65 uint32_t flags,
66 struct registry_key *root_key,
67 const struct security_token *token,
68 struct GROUP_POLICY_OBJECT *gpo,
69 const char *extension_guid,
70 const char *snapin_guid);
72 NTSTATUS (*get_reg_config)(TALLOC_CTX *mem_ctx,
73 struct gp_extension_reg_info **info);
75 NTSTATUS (*shutdown)(void);
78 /* The following definitions come from libgpo/gpext/gpext.c */
80 struct gp_extension *gpext_get_gp_extension_list(void);
81 NTSTATUS gpext_unregister_gp_extension(const char *name);
82 NTSTATUS gpext_register_gp_extension(TALLOC_CTX *gpext_ctx,
83 int version,
84 const char *name,
85 const char *guid,
86 struct gp_extension_methods *methods);
87 NTSTATUS gpext_info_add_entry(TALLOC_CTX *mem_ctx,
88 const char *module,
89 const char *ext_guid,
90 struct gp_extension_reg_table *table,
91 struct gp_extension_reg_info *info);
92 NTSTATUS gpext_shutdown_gp_extensions(void);
93 NTSTATUS gpext_init_gp_extensions(TALLOC_CTX *mem_ctx);
94 NTSTATUS gpext_free_gp_extensions(void);
95 void gpext_debug_header(int lvl,
96 const char *name,
97 uint32_t flags,
98 struct GROUP_POLICY_OBJECT *gpo,
99 const char *extension_guid,
100 const char *snapin_guid);
101 NTSTATUS gpext_process_gpo_list_with_extension(TALLOC_CTX *mem_ctx,
102 uint32_t flags,
103 const struct security_token *token,
104 struct GROUP_POLICY_OBJECT *gpo_list,
105 const char *extension_guid,
106 const char *snapin_guid);
107 NTSTATUS gpext_process_extension(TALLOC_CTX *mem_ctx,
108 uint32_t flags,
109 const struct security_token *token,
110 struct registry_key *root_key,
111 struct GROUP_POLICY_OBJECT *gpo,
112 const char *extension_guid,
113 const char *snapin_guid);
116 #endif /* __GPEXT_H__ */