VirtualBox

source: vbox/trunk/src/VBox/Main/include/VirtualBoxClientListImpl.h@ 72353

Last change on this file since 72353 was 71160, checked in by vboxsync, 7 years ago

Main/VBoxSVC,VBoxSDS: fix for ​​​​​​​​​​bugref:8161: added svn:sync-process export to RpcChannelHook.cpp and VirtualBoxClientListImpl.cpp. Copyright format fix for scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1/** @file
2* VBox Global COM Class definition
3*/
4
5/*
6 * Copyright (C) 2017-2018 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 */
16
17#ifndef ____H_VIRTUALBOXCLIENTLISTIMPL
18#define ____H_VIRTUALBOXCLIENTLISTIMPL
19
20#include <vector>
21#include <set>
22#include <memory>
23#include <iprt/thread.h>
24#include <iprt/semaphore.h>
25
26#include "VirtualBoxBase.h"
27#include "VirtualBoxClientListWrap.h"
28
29/**
30* The IVirtualBoxClientList implementation.
31*
32* This class provides COM interface to track and get list of
33* API client processes.
34*
35*/
36
37typedef std::set<LONG> TClientSet;
38
39class CClientListWatcher;
40
41class ATL_NO_VTABLE VirtualBoxClientList
42 : public VirtualBoxClientListWrap
43#ifdef RT_OS_WINDOWS
44 , public ATL::CComCoClass<VirtualBoxClientList, &CLSID_VirtualBoxClientList>
45#endif
46{
47private:
48 /** Lock protecting m_ClientSet.*/
49 RTCRITSECTRW m_MapCritSect;
50 TClientSet m_ClientSet;
51
52public:
53 DECLARE_CLASSFACTORY_SINGLETON(VirtualBoxClientList)
54 DECLARE_NOT_AGGREGATABLE(VirtualBoxClientList)
55 VirtualBoxClientList() : m_pWatcher(NULL) {}
56 virtual ~VirtualBoxClientList() {}
57
58 HRESULT FinalConstruct();
59 void FinalRelease();
60
61private:
62 // VirtualBoxClientList methods
63 HRESULT registerClient(LONG aPid);
64 HRESULT getClients(std::vector<LONG> &aEnvironment);
65
66 // Private members
67 // polling of unexpectedly finished api client processes
68 CClientListWatcher* m_pWatcher;
69};
70
71
72
73#endif // !____H_VIRTUALBOXCLIENTLISTIMPL
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