Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 15f1975d5e
Fetching contributors…

Cannot retrieve contributors at this time

file 99 lines (88 sloc) 5.364 kb
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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
/****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see <http://www.gnu.org/licenses/>.*
* *
****************************************************************************/
#ifndef __XN_DEVICE_PROXY_H__
#define __XN_DEVICE_PROXY_H__

//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include <XnPlatform.h>

//---------------------------------------------------------------------------
// Exported Functions
//---------------------------------------------------------------------------

/*****************************/
/* XnDevice interface */
/*****************************/
#define XN_DEVICE_PROXY_PROTO_APPEND(prefix, name) prefix ## name
#define XN_DEVICE_PROXY_PROTO(name) XN_DEVICE_PROXY_PROTO_APPEND(XnDeviceProxy, name)
#define XN_DEVICE_INTERFACE_FUNCTION(name, sig) XN_DDK_API XnStatus XN_DEVICE_PROXY_PROTO(name)sig;
#include <XnDeviceProto.inl>
#undef XN_DEVICE_INTERFACE_FUNCTION

/****************************/
/* Specific Proxy Functions */
/****************************/

/**
* Gets a list of supported devices, meaning, devices loaded by device manager.
*
* @param aDeviceDefinitions [in] An array of XnDeviceDefinition to be filled with information.
* @param pnCount [in/out] In: the size of the array. Out: the number of elements filled in the array.
*/
XN_DDK_API XnStatus XnDeviceProxyGetDeviceList(XnDeviceDefinition* aDeviceDefinitions, XnUInt32* pnCount);

/**
* Enumerates a specific device, by device name.
*
* @param csDeviceName [in] The name of the device to enumerate.
* @param aConnectionStrings [in] An array to be filled with connection strings.
* @param pnCount [in/out] In: the size of the array. Out: the number of elements filled in the array.
*/
XN_DDK_API XnStatus XnDeviceProxyEnumerateDeviceByName(const XnChar* csDeviceName, XnConnectionString* aConnectionStrings, XnUInt32* pnCount);

/**
* Creates a device by name.
*
* @param csDeviceName [in] The name of the device to create. The special value "Auto" will create any available device.
* @param pDeviceHandle [out] The opened device handle. If the function fails, NULL is returned.
* @param pDeviceConfig [in] The requested device configuration mode. Contains the mode (read/write) and the target connection string.
*/
XN_DDK_API XnStatus XnDeviceProxyCreateDeviceByName(const XnChar* csDeviceName, XnDeviceHandle* pDeviceHandle, const XnDeviceConfig* pDeviceConfig);

/**
* Creates a device by definitions in INI file.
*
* @param strIniFileName [in] INI file to use for initialization.
* @param strSectionName [in] section name in INI file that describes the device.
* @param pDeviceHandle [out] The opened device handle. If the function fails, NULL is returned.
* @param pInitialValues [in] Optional. A set of initial values to be used.
*/
XN_DDK_API XnStatus XnDeviceProxyCreateDeviceByINIFile(const XnChar* strIniFileName, const XnChar* strSectionName, XnDeviceHandle* pDeviceHandle, const XnPropertySet* pInitialValues);

/**
* Destroys a stream output object that was previously created using CreateStreamOutput.
*
* @param csDeviceName [in] The name of the device that created this object.
* @param ppStreamOutput [in] The stream output object to destroy.
*/
XN_DDK_API XnStatus XnDeviceProxyDestroyStreamOutputByName(const XnChar* csDeviceName, XnStreamData** ppStreamOutput);

/**
* Gets the name of an opened device.
*
* @param DeviceHandle [in] The requested device handle.
* @param csDeviceName [in/out] A string to be filled with its name. The buffer must be at least XN_DEVICE_MAX_STRING_LENGTH long.
*/
XN_DDK_API XnStatus XnDeviceProxyGetDeviceName(XnDeviceHandle DeviceHandle, XnChar* csDeviceName);

#endif //__XN_DEVICE_PROXY_H__
Something went wrong with that request. Please try again.