VirtualBox

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

Last change on this file since 8155 was 8155, checked in by vboxsync, 16 years ago

The Big Sun Rebranding Header Change

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.3 KB
Line 
1/** @file
2 * VBox Remote Desktop Protocol:
3 * External Authentication Library Interface.
4 */
5
6/*
7 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
27 * Clara, CA 95054 USA or visit http://www.sun.com if you need
28 * additional information or have any questions.
29 */
30
31#ifndef ___VBox_vrdpauth_h
32#define ___VBox_vrdpauth_h
33
34/* The following 2 enums are 32 bits values.*/
35typedef enum _VRDPAuthResult
36{
37 VRDPAuthAccessDenied = 0,
38 VRDPAuthAccessGranted = 1,
39 VRDPAuthDelegateToGuest = 2,
40 VRDPAuthSizeHack = 0x7fffffff
41} VRDPAuthResult;
42
43typedef enum _VRDPAuthGuestJudgement
44{
45 VRDPAuthGuestNotAsked = 0,
46 VRDPAuthGuestAccessDenied = 1,
47 VRDPAuthGuestNoJudgement = 2,
48 VRDPAuthGuestAccessGranted = 3,
49 VRDPAuthGuestNotReacted = 4,
50 VRDPAuthGuestSizeHack = 0x7fffffff
51} VRDPAuthGuestJudgement;
52
53/* UUID memory representation. Array of 16 bytes. */
54typedef unsigned char VRDPAUTHUUID[16];
55typedef VRDPAUTHUUID *PVRDPAUTHUUID;
56
57
58/* The library entry point calling convention. */
59#ifdef _MSC_VER
60# define VRDPAUTHCALL __cdecl
61#elif defined(__GNUC__)
62# define VRDPAUTHCALL
63#else
64# error "Unsupported compiler"
65#endif
66
67
68/**
69 * Authentication library entry point. Decides whether to allow
70 * a client connection.
71 *
72 * Parameters:
73 *
74 * pUuid Pointer to the UUID of the virtual machine
75 * which the client connected to.
76 * guestJudgement Result of the guest authentication.
77 * szUser User name passed in by the client (UTF8).
78 * szPassword Password passed in by the client (UTF8).
79 * szDomain Domain passed in by the client (UTF8).
80 *
81 * Return code:
82 *
83 * VRDPAuthAccessDenied Client access has been denied.
84 * VRDPAuthAccessGranted Client has the right to use the
85 * virtual machine.
86 * VRDPAuthDelegateToGuest Guest operating system must
87 * authenticate the client and the
88 * library must be called again with
89 * the result of the guest
90 * authentication.
91 */
92typedef VRDPAuthResult VRDPAUTHCALL VRDPAUTHENTRY(PVRDPAUTHUUID pUuid,
93 VRDPAuthGuestJudgement guestJudgement,
94 const char *szUser,
95 const char *szPassword,
96 const char *szDomain);
97
98
99typedef VRDPAUTHENTRY *PVRDPAUTHENTRY;
100
101/**
102 * Authentication library entry point version 2. Decides whether to allow
103 * a client connection.
104 *
105 * Parameters:
106 *
107 * pUuid Pointer to the UUID of the virtual machine
108 * which the client connected to.
109 * guestJudgement Result of the guest authentication.
110 * szUser User name passed in by the client (UTF8).
111 * szPassword Password passed in by the client (UTF8).
112 * szDomain Domain passed in by the client (UTF8).
113 * fLogon Boolean flag. Indicates whether the entry point is called
114 * for a client logon or the client disconnect.
115 * clientId Server side unique identifier of the client.
116 *
117 * Return code:
118 *
119 * VRDPAuthAccessDenied Client access has been denied.
120 * VRDPAuthAccessGranted Client has the right to use the
121 * virtual machine.
122 * VRDPAuthDelegateToGuest Guest operating system must
123 * authenticate the client and the
124 * library must be called again with
125 * the result of the guest
126 * authentication.
127 *
128 * Note: When 'fLogon' is 0, only pUuid and clientId are valid and the return
129 * code is ignored.
130 */
131typedef VRDPAuthResult VRDPAUTHCALL VRDPAUTHENTRY2(PVRDPAUTHUUID pUuid,
132 VRDPAuthGuestJudgement guestJudgement,
133 const char *szUser,
134 const char *szPassword,
135 const char *szDomain,
136 int fLogon,
137 unsigned clientId);
138
139
140typedef VRDPAUTHENTRY2 *PVRDPAUTHENTRY2;
141
142#endif
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use