VirtualBox

source: vbox/trunk/include/VBox/VRDPAuth.h@ 8113

Last change on this file since 8113 was 5999, checked in by vboxsync, 17 years ago

The Giant CDDL Dual-License Header Change.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.1 KB
Line 
1/** @file
2 * VBox Remote Desktop Protocol:
3 * External Authentication Library Interface.
4 */
5
6/*
7 * Copyright (C) 2006-2007 innotek GmbH
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27#ifndef ___VBox_vrdpauth_h
28#define ___VBox_vrdpauth_h
29
30/* The following 2 enums are 32 bits values.*/
31typedef enum _VRDPAuthResult
32{
33 VRDPAuthAccessDenied = 0,
34 VRDPAuthAccessGranted = 1,
35 VRDPAuthDelegateToGuest = 2,
36 VRDPAuthSizeHack = 0x7fffffff
37} VRDPAuthResult;
38
39typedef enum _VRDPAuthGuestJudgement
40{
41 VRDPAuthGuestNotAsked = 0,
42 VRDPAuthGuestAccessDenied = 1,
43 VRDPAuthGuestNoJudgement = 2,
44 VRDPAuthGuestAccessGranted = 3,
45 VRDPAuthGuestNotReacted = 4,
46 VRDPAuthGuestSizeHack = 0x7fffffff
47} VRDPAuthGuestJudgement;
48
49/* UUID memory representation. Array of 16 bytes. */
50typedef unsigned char VRDPAUTHUUID[16];
51typedef VRDPAUTHUUID *PVRDPAUTHUUID;
52
53
54/* The library entry point calling convention. */
55#ifdef _MSC_VER
56# define VRDPAUTHCALL __cdecl
57#elif defined(__GNUC__)
58# define VRDPAUTHCALL
59#else
60# error "Unsupported compiler"
61#endif
62
63
64/**
65 * Authentication library entry point. Decides whether to allow
66 * a client connection.
67 *
68 * Parameters:
69 *
70 * pUuid Pointer to the UUID of the virtual machine
71 * which the client connected to.
72 * guestJudgement Result of the guest authentication.
73 * szUser User name passed in by the client (UTF8).
74 * szPassword Password passed in by the client (UTF8).
75 * szDomain Domain passed in by the client (UTF8).
76 *
77 * Return code:
78 *
79 * VRDPAuthAccessDenied Client access has been denied.
80 * VRDPAuthAccessGranted Client has the right to use the
81 * virtual machine.
82 * VRDPAuthDelegateToGuest Guest operating system must
83 * authenticate the client and the
84 * library must be called again with
85 * the result of the guest
86 * authentication.
87 */
88typedef VRDPAuthResult VRDPAUTHCALL VRDPAUTHENTRY(PVRDPAUTHUUID pUuid,
89 VRDPAuthGuestJudgement guestJudgement,
90 const char *szUser,
91 const char *szPassword,
92 const char *szDomain);
93
94
95typedef VRDPAUTHENTRY *PVRDPAUTHENTRY;
96
97/**
98 * Authentication library entry point version 2. Decides whether to allow
99 * a client connection.
100 *
101 * Parameters:
102 *
103 * pUuid Pointer to the UUID of the virtual machine
104 * which the client connected to.
105 * guestJudgement Result of the guest authentication.
106 * szUser User name passed in by the client (UTF8).
107 * szPassword Password passed in by the client (UTF8).
108 * szDomain Domain passed in by the client (UTF8).
109 * fLogon Boolean flag. Indicates whether the entry point is called
110 * for a client logon or the client disconnect.
111 * clientId Server side unique identifier of the client.
112 *
113 * Return code:
114 *
115 * VRDPAuthAccessDenied Client access has been denied.
116 * VRDPAuthAccessGranted Client has the right to use the
117 * virtual machine.
118 * VRDPAuthDelegateToGuest Guest operating system must
119 * authenticate the client and the
120 * library must be called again with
121 * the result of the guest
122 * authentication.
123 *
124 * Note: When 'fLogon' is 0, only pUuid and clientId are valid and the return
125 * code is ignored.
126 */
127typedef VRDPAuthResult VRDPAUTHCALL VRDPAUTHENTRY2(PVRDPAUTHUUID pUuid,
128 VRDPAuthGuestJudgement guestJudgement,
129 const char *szUser,
130 const char *szPassword,
131 const char *szDomain,
132 int fLogon,
133 unsigned clientId);
134
135
136typedef VRDPAUTHENTRY2 *PVRDPAUTHENTRY2;
137
138#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette