File: XnServerUSBLinuxConnectionFactory.h

package info (click to toggle)
openni2 2.2.0.33%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 22,216 kB
  • sloc: cpp: 111,197; ansic: 35,511; sh: 10,542; python: 1,313; java: 952; makefile: 575; xml: 12
file content (40 lines) | stat: -rw-r--r-- 1,159 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef __XNSERVERLINUXUSBCONNECTIONFACTORY_H__
#define __XNSERVERLINUXUSBCONNECTIONFACTORY_H__

#include "IConnectionFactory.h"
#include "XnServerUSBLinuxControlEndpoint.h"
#include <XnOS.h>

struct XnUSBDevice;

namespace xn
{

class ServerUSBLinuxConnectionFactory : public IConnectionFactory
{
public:
	ServerUSBLinuxConnectionFactory();
	virtual ~ServerUSBLinuxConnectionFactory();
	
	virtual XnStatus Init(const XnChar* strConnString);
	virtual void Shutdown();
	virtual XnBool IsInitialized() const;
	virtual XnUInt16 GetNumInputDataConnections() const;
	virtual XnUInt16 GetNumOutputDataConnections() const;

	/** The pointer returned by GetControlConnection() belongs to the connection factory and 
	    must not be deleted by caller. **/
	virtual XnStatus GetControlConnection(ISyncIOConnection*& pConn);

	virtual XnStatus CreateOutputDataConnection(XnUInt16 nID, IOutputConnection*& pConn);
	virtual XnStatus CreateInputDataConnection(XnUInt16 nID, IAsyncInputConnection*& pConn);

private:
	ServerUSBLinuxControlEndpoint m_controlEndpoint;
	XnUSBDevice* m_pDevice;
	XnBool m_bInitialized;
};

}

#endif // __XNSERVERLINUXUSBCONNECTIONFACTORY_H__