2 * Copyright (c) 2006 Secure Endpoints Inc.
4 * Permission is hereby granted, free of charge, to any person
5 * obtaining a copy of this software and associated documentation
6 * files (the "Software"), to deal in the Software without
7 * restriction, including without limitation the rights to use, copy,
8 * modify, merge, publish, distribute, sublicense, and/or sell copies
9 * of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be
13 * included in all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 /* only include this header file once */
32 /* This template relies on _UNICODE being defined to call the correct
34 #error This template needs to be compiled with _UNICODE
38 /* Pull in configuration macros from the Makefile */
39 #include "credacq_config.h"
41 /* declare a few macros about our plugin */
43 /* The following macro will be used throughout the template to refer
44 to the name of the plugin. The macro is actually defined the
45 Makefile generated configuration header file. Modify the
46 PLUGINNAME Makefile macro.*/
48 #error MYPLUGIN_NAME not defined
51 /* Also define the unicde equivalent of the name. In general strings
52 in NetIDMgr are unicode. */
53 #define MYPLUGIN_NAMEW _T(MYPLUGIN_NAME)
55 /* The name of the module. This is distinct from the name of the
56 plugin for several reasons. One of which is that a single module
57 can provide multiple plugins. Also, having a module name distinct
58 from a plugin name allows multiple vendors to provide the same
59 plugin. For example, the module name for the MIT Kerberos 5 plugin
60 is MITKrb5 while the plugin name is Krb5Cred. The macro is
61 actually defined in the Makefile generated configuration header
62 file. Modify the MODULENAME Makefile macro.*/
64 #error MYMODULE_NAME not defined
67 #define MYMODULE_NAMEW _T(MYMODULE_NAME)
69 /* When logging events from our plugin, the event logging API can
70 optionally take a facility name to provide a friendly label to
71 identify where each event came from. We will default to the plugin
72 name, although it can be anything. */
73 #define MYPLUGIN_FACILITYW MYPLUGIN_NAMEW
75 /* Base name of the DLL that will be providing the plugin. We use it
76 to construct names of the DLLs that will contain localized
77 resources. This is defined in the Makefile and fed in to the build
78 through there. The macro to change in the Makefile is
80 #ifndef MYPLUGIN_DLLBASE
81 #error MYPLUGIN_DLLBASE Not defined!
84 #define MYPLUGIN_DLLBASEW _T(MYPLUGIN_DLLBASE)
86 /* Name of the authentication method that will be registered by the
87 plugin. This macro is actually defined in the Makefile generated
88 configuration header file. Change the AUTHMETHODNAME macro in the
90 #ifndef AUTHMETHOD_NAME
91 #error AUTHMETHOD_NAME not defined
94 #define AUTHMETHOD_NAMEW _T(AUTHMETHOD_NAME)
96 /* Configuration node names. We just concatenate a few strings
97 together, although you should feel free to completely define your
100 #define CONFIGNODE_MAIN AUTHMETHOD_NAMEW L"Config"
103 /* include the standard NetIDMgr header files */
106 /* And the AFS plug-in extension header file */
110 /* declarations for language resources */
117 /***************************************************
119 ***************************************************/
121 extern kmm_module h_khModule;
122 extern HINSTANCE hInstance;
123 extern HMODULE hResModule;
124 extern afs_tk_method tk_method;
126 extern const wchar_t * my_facility;
128 /* Function declarations */
132 handle_AFS_MSG(khm_int32 msg_type,
133 khm_int32 msg_subtype,
139 plugin_msg_proc(khm_int32 msg_type,
140 khm_int32 msg_subtype,
144 /* in config_main.c */
146 config_dlgproc(HWND hwndDlg,