VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/VBoxCredProv/VBoxCredProvProvider.h@ 40272

Last change on this file since 40272 was 40271, checked in by vboxsync, 13 years ago

VBoxCredProv: fixed svn properties

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1/* $Id: VBoxCredProvProvider.h 40271 2012-02-28 11:22:04Z vboxsync $ */
2/** @file
3 * VBoxCredProvProvider - The actual credential provider class.
4 */
5
6/*
7 * Copyright (C) 2012 Oracle Corporation
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
18#ifndef __VBOX_CREDPROV_PROVIDER_H__
19#define __VBOX_CREDPROV_PROVIDER_H__
20
21#include <credentialprovider.h>
22#include <windows.h>
23#include <strsafe.h>
24
25#include <VBox/VboxGuestLib.h>
26
27#include "VBoxCredProvCredential.h"
28#include "VBoxCredProvPoller.h"
29
30class VBoxCredProvProvider : public ICredentialProvider
31{
32 public:
33
34 /** IUnknown methods. */
35 IFACEMETHODIMP_(ULONG) AddRef(void);
36 IFACEMETHODIMP_(ULONG) Release(void);
37 IFACEMETHODIMP QueryInterface(REFIID interfaceID, void **ppvInterface);
38
39 public:
40
41 /** ICredentialProvider interface. */
42 IFACEMETHODIMP SetUsageScenario(CREDENTIAL_PROVIDER_USAGE_SCENARIO cpUsageScenario, DWORD dwFlags);
43 IFACEMETHODIMP SetSerialization(const CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION *pcpCredentialSerialization);
44
45 IFACEMETHODIMP Advise(__in ICredentialProviderEvents *pcpEvents, UINT_PTR upAdviseContext);
46 IFACEMETHODIMP UnAdvise();
47
48 IFACEMETHODIMP GetFieldDescriptorCount(__out DWORD* pdwCount);
49 IFACEMETHODIMP GetFieldDescriptorAt(DWORD dwIndex, __deref_out CREDENTIAL_PROVIDER_FIELD_DESCRIPTOR **ppcpFieldDescriptor);
50
51 IFACEMETHODIMP GetCredentialCount(__out DWORD *pdwCount,
52 __out DWORD *pdwDefault,
53 __out BOOL *pbAutoLogonWithDefault);
54 IFACEMETHODIMP GetCredentialAt(DWORD dwIndex,
55 __out ICredentialProviderCredential **ppcpc);
56 public:
57
58 friend HRESULT VBoxCredProvProviderCreate(REFIID riid, __deref_out void **ppv);
59
60 protected:
61
62 VBoxCredProvProvider(void);
63
64 virtual ~VBoxCredProvProvider(void);
65
66 public:
67
68 DWORD LoadConfiguration(void);
69 bool HandleCurrentSession(void);
70
71 /** Events. */
72 void OnCredentialsProvided(void);
73
74 private:
75
76 /** Interface reference count. */
77 ULONG m_cRefCount;
78 /** Our one and only credential. */
79 VBoxCredProvCredential *m_pCred;
80 /** Poller thread for credential lookup. */
81 VBoxCredProvPoller *m_pPoller;
82 /** Used to tell our owner to re-enumerate credentials. */
83 ICredentialProviderEvents *m_pCredProvEvents;
84 /** Used to tell our owner who we are when asking to re-enumerate credentials. */
85 UINT_PTR m_upAdviseContext;
86 /** Saved usage scenario. */
87 CREDENTIAL_PROVIDER_USAGE_SCENARIO m_cpUsageScenario;
88 /** Flag indicating we got some credentials to work with. */
89 bool m_fGotCredentials;
90 /** Flag whether we need to handle remote session over Windows Remote
91 * Desktop Service. */
92 bool m_fHandleRemoteSessions;
93};
94
95#endif /* !__VBOX_CREDPROV_PROVIDER_H__ */
96
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