VirtualBox

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

Last change on this file since 76083 was 76066, checked in by vboxsync, 6 years ago

VBoxSDS: updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1/* $Id: VirtualBoxClientListImpl.h 76066 2018-12-07 22:17:39Z vboxsync $ */
2/** @file
3 * Main - VBoxSDS - VirtualBoxClientList.
4 */
5
6/*
7 * Copyright (C) 2017-2018 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 ____H_VIRTUALBOXCLIENTLISTIMPL
19#define ____H_VIRTUALBOXCLIENTLISTIMPL
20
21#include <vector>
22#include <set>
23#include <memory>
24#include <iprt/thread.h>
25#include <iprt/semaphore.h>
26
27#include "VirtualBoxBase.h"
28#include "VirtualBoxClientListWrap.h"
29
30typedef std::set<LONG> TClientSet;
31
32class CClientListWatcher;
33
34/**
35 * The IVirtualBoxClientList implementation.
36 *
37 * This class provides COM interface to track and get list of
38 * API client processes.
39 */
40class ATL_NO_VTABLE VirtualBoxClientList
41 : public VirtualBoxClientListWrap
42#ifdef RT_OS_WINDOWS
43 , public ATL::CComCoClass<VirtualBoxClientList, &CLSID_VirtualBoxClientList>
44#endif
45{
46private:
47 /** Lock protecting m_ClientSet.*/
48 RTCRITSECTRW m_MapCritSect;
49 TClientSet m_ClientSet;
50
51public:
52 DECLARE_CLASSFACTORY_SINGLETON(VirtualBoxClientList) /**< r=bird: It is _NOT_ a singleton. */
53 DECLARE_NOT_AGGREGATABLE(VirtualBoxClientList)
54 VirtualBoxClientList() : m_pWatcher(NULL) {}
55 virtual ~VirtualBoxClientList() {}
56
57 HRESULT FinalConstruct();
58 void FinalRelease();
59
60private:
61 // VirtualBoxClientList methods
62 HRESULT registerClient(LONG aPid);
63 HRESULT getClients(std::vector<LONG> &aEnvironment);
64
65 // Private members
66 // polling of unexpectedly finished api client processes
67 CClientListWatcher *m_pWatcher;
68};
69
70
71
72#endif // !____H_VIRTUALBOXCLIENTLISTIMPL
73
Note: See TracBrowser for help on using the repository browser.

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