OpenNI 1.5.4
XnContext.h
Go to the documentation of this file.
1 /****************************************************************************
2 * *
3 * OpenNI 1.x Alpha *
4 * Copyright (C) 2011 PrimeSense Ltd. *
5 * *
6 * This file is part of OpenNI. *
7 * *
8 * OpenNI is free software: you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published *
10 * by the Free Software Foundation, either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * OpenNI is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with OpenNI. If not, see <http://www.gnu.org/licenses/>. *
20 * *
21 ****************************************************************************/
22 #ifndef __XN_CONTEXT_H__
23 #define __XN_CONTEXT_H__
24 
78 //---------------------------------------------------------------------------
79 // Includes
80 //---------------------------------------------------------------------------
81 #include <XnTypes.h>
82 #include <XnQueries.h>
83 #include <XnPrdNodeInfoList.h>
84 
85 //---------------------------------------------------------------------------
86 // Functions
87 //---------------------------------------------------------------------------
88 
101 XN_C_API XnStatus XN_C_DECL xnInit(XnContext** ppContext);
102 
112 XN_C_API XnStatus XN_C_DECL xnContextRunXmlScriptFromFileEx(XnContext* pContext, const XnChar* strFileName, XnEnumerationErrors* pErrors, XnNodeHandle* phScriptNode);
113 
125 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnContextRunXmlScriptFromFileEx() instead") xnContextRunXmlScriptFromFile(XnContext* pContext, const XnChar* strFileName, XnEnumerationErrors* pErrors);
126 
136 XN_C_API XnStatus XN_C_DECL xnContextRunXmlScriptEx(XnContext* pContext, const XnChar* xmlScript, XnEnumerationErrors* pErrors, XnNodeHandle* phScriptNode);
137 
149 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnContextRunXmlScriptEx() instead") XN_C_DECL xnContextRunXmlScript(XnContext* pContext, const XnChar* xmlScript, XnEnumerationErrors* pErrors);
150 
160 XN_C_API XnStatus XN_C_DECL xnInitFromXmlFileEx(const XnChar* strFileName, XnContext** ppContext, XnEnumerationErrors* pErrors, XnNodeHandle* phScriptNode);
161 
173 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnInitFromXmlFileEx() instead") XN_C_DECL xnInitFromXmlFile(const XnChar* strFileName, XnContext** ppContext, XnEnumerationErrors* pErrors);
174 
182 XN_C_API XnStatus XN_C_DECL xnContextOpenFileRecordingEx(XnContext* pContext, const XnChar* strFileName, XnNodeHandle* phPlayerNode);
183 
194 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnContextOpenFileRecordingEx() instead") XN_C_DECL xnContextOpenFileRecording(XnContext* pContext, const XnChar* strFileName);
195 
201 XN_C_API XnStatus XN_C_DECL xnContextAddRef(XnContext* pContext);
202 
209 XN_C_API void XN_C_DECL xnContextRelease(XnContext* pContext);
210 
219 XN_C_API void XN_API_DEPRECATED("Use xnContextRelease() instead") XN_C_DECL xnShutdown(XnContext* pContext);
220 
227 XN_C_API void XN_C_DECL xnForceShutdown(XnContext* pContext);
228 
233 XN_C_API XnStatus XN_C_DECL xnContextRegisterForShutdown(XnContext* pContext, XnContextShuttingDownHandler pHandler, void* pCookie, XnCallbackHandle* phCallback);
234 
239 XN_C_API void XN_C_DECL xnContextUnregisterFromShutdown(XnContext* pContext, XnCallbackHandle hCallback);
240 
241 // @}
242 
259  XnContext* pContext,
260  XnProductionNodeType Type,
261  const XnNodeQuery* pQuery,
262  XnNodeInfoList** ppTreesList,
263  XnEnumerationErrors* pErrors
264  );
265 
275  XnContext* pContext,
276  XnNodeInfo* pTree,
277  XnNodeHandle* phNode
278  );
279 
292  XnContext* pContext,
294  XnNodeQuery* pQuery,
295  XnNodeHandle* phNode,
296  XnEnumerationErrors* pErrors
297  );
298 
311  XnContext* pContext,
313  const XnChar* strName,
314  XnNodeHandle* phNode
315  );
316 
329  XnContext* pContext,
330  XnNodeHandle hOriginalNode,
331  const XnChar* strName,
332  XnNodeHandle* phMockNode
333  );
334 
341 
348 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnProductionNodeAddRef() instead.") XN_C_DECL xnRefProductionNode(XnNodeHandle hNode);
349 
356 XN_C_API void XN_C_DECL xnProductionNodeRelease(XnNodeHandle hNode);
357 
365 XN_C_API void XN_API_DEPRECATED("Please use xnProductionNodeRelease() instead.") XN_C_DECL xnUnrefProductionNode(XnNodeHandle hNode);
366 
374 XN_C_API XnStatus XN_C_DECL xnEnumerateExistingNodes(XnContext* pContext, XnNodeInfoList** ppList);
375 
385 
394  XnContext* pContext,
396  XnNodeHandle* phNode
397  );
398 
399 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnFindExistingRefNodeByType() instead") XN_C_DECL xnFindExistingNodeByType(
400  XnContext* pContext,
402  XnNodeHandle* phNode
403  );
404 
415  XnContext* pContext,
416  const XnChar* strInstanceName,
417  XnNodeHandle* phNode
418  );
419 
420 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnGetRefNodeHandleByName() instead") XN_C_DECL xnGetNodeHandleByName(
421  XnContext* pContext,
422  const XnChar* strInstanceName,
423  XnNodeHandle* phNode
424  );
425 
426 // @}
427 
438 XN_C_API XnStatus XN_C_DECL xnWaitAndUpdateAll(XnContext* pContext);
439 
446 XN_C_API XnStatus XN_C_DECL xnWaitOneUpdateAll(XnContext* pContext, XnNodeHandle hNode);
447 
453 XN_C_API XnStatus XN_C_DECL xnWaitAnyUpdateAll(XnContext* pContext);
454 
461 XN_C_API XnStatus XN_C_DECL xnWaitNoneUpdateAll(XnContext* pContext);
462 
468 XN_C_API XnStatus XN_C_DECL xnStartGeneratingAll(XnContext* pContext);
469 
475 XN_C_API XnStatus XN_C_DECL xnStopGeneratingAll(XnContext* pContext);
476 
484 XN_C_API XnStatus XN_C_DECL xnSetGlobalMirror(XnContext* pContext, XnBool bMirror);
485 
491 XN_C_API XnBool XN_C_DECL xnGetGlobalMirror(XnContext* pContext);
492 
500 XN_C_API XnStatus XN_C_DECL xnGetGlobalErrorState(XnContext* pContext);
501 
511  (XnContext* pContext, XnErrorStateChangedHandler handler,
512  void* pCookie, XnCallbackHandle* phCallback);
513 
521  (XnContext* pContext, XnCallbackHandle hCallback);
522 
532  (XnContext* pContext, XnNodeCreationHandler handler,
533  void* pCookie, XnCallbackHandle* phCallback);
534 
542  (XnContext* pContext, XnCallbackHandle hCallback);
543 
553  (XnContext* pContext, XnNodeDestructionHandler handler,
554  void* pCookie, XnCallbackHandle* phCallback);
555 
563  (XnContext* pContext, XnCallbackHandle hCallback);
564 
566 
569 #endif // __XN_CONTEXT_H__