AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
pnp.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #include <assert.h>
9 #include "ajabase/pnp/pnp.h"
10 
11 #if defined(AJA_WINDOWS)
13 #endif
14 
15 #if defined(AJA_LINUX)
17 #endif
18 
19 #if defined(AJA_MAC)
20  #include "ajabase/pnp/mac/pnpimpl.h"
21 #endif
22 
23 
24 
26 {
27  mpImpl = new AJAPnpImpl();
28 }
29 
30 
32 {
33  delete mpImpl;
34 }
35 
36 
37 AJAStatus
38 AJAPnp::Install(AJAPnpCallback callback, void* refCon, uint32_t devices)
39 {
40  return mpImpl->Install(callback, refCon, devices);
41 }
42 
43 
46 {
47  return mpImpl->Uninstall();
48 }
49 
50 
53 {
54  return mpImpl->GetCallback();
55 }
56 
57 
58 void*
60 {
61  return mpImpl->GetRefCon();
62 }
63 
64 
65 uint32_t
67 {
68  return mpImpl->GetPnpDevices();
69 }
70 
71 
72 AJAPnp::AJAPnp (const AJAPnp & inObjToCopy)
73 {
74  AJA_UNUSED(inObjToCopy); assert (false && "hidden copy constructor"); // mpImpl=inObjToCopy.mpImpl;
75 }
76 
77 
78 AJAPnp &
79 AJAPnp::operator= (const AJAPnp & inObjToCopy)
80 {
81  if (&inObjToCopy != this)
82  assert (false && "hidden assignment operator"); // mpImpl = inObjToCopy.mpImpl;
83 
84  return *this;
85 
86 } // copy constructor
AJAPnpImpl::Uninstall
AJAStatus Uninstall(void)
Definition: pnpimpl.cpp:62
AJAPnp
This is a platform-agnostic plug-and-play class that notifies a client when AJA devices are attached/...
Definition: pnp.h:50
AJAPnpCallback
void(* AJAPnpCallback)(AJAPnpMessage inMessage, void *inRefCon)
If installed (see AJAPnp::Install) in an AJAPnp instance, this function is called when an AJA device ...
Definition: pnp.h:39
AJAPnp::GetCallback
virtual AJAPnpCallback GetCallback() const
Definition: pnp.cpp:52
pnpimpl.h
Declares the AJAPnpImpl class.
AJAPnp::GetPnpDevices
virtual uint32_t GetPnpDevices() const
Definition: pnp.cpp:66
AJA_UNUSED
#define AJA_UNUSED(_x_)
Definition: types.h:424
AJAPnp::AJAPnp
AJAPnp()
Default constructor.
Definition: pnp.cpp:25
pnpimpl.h
Declares the AJAPnpImpl class.
AJAPnp::Uninstall
virtual AJAStatus Uninstall()
Uninstalls any previously-installed callback notifier.
Definition: pnp.cpp:45
AJAStatus
AJAStatus
Definition: types.h:378
AJAPnpImpl::GetPnpDevices
uint32_t GetPnpDevices(void) const
Definition: pnpimpl.h:24
AJAPnpImpl::Install
AJAStatus Install(AJAPnpCallback callback, void *refCon, uint32_t devices)
Definition: pnpimpl.cpp:32
AJAPnp::~AJAPnp
virtual ~AJAPnp()
Default destructor.
Definition: pnp.cpp:31
AJAPnpImpl
Definition: pnpimpl.h:13
pnp.h
Declares the AJAPnp (plug-and-play) class.
pnpimpl.h
Declares the AJAPnpImpl class.
AJAPnpImpl::GetCallback
AJAPnpCallback GetCallback(void) const
Definition: pnpimpl.h:22
AJAPnp::Install
virtual AJAStatus Install(AJAPnpCallback pInCallback, void *inRefCon=NULL, uint32_t inDeviceMask=0xFFFFFFFF)
Installs the given plug & play notification callback function, replacing any callback function that m...
Definition: pnp.cpp:38
AJAPnp::GetRefCon
virtual void * GetRefCon() const
Definition: pnp.cpp:59
AJAPnpImpl::GetRefCon
void * GetRefCon(void) const
Definition: pnpimpl.h:23