OpenNI 1.5.7
XnContext.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * *
3 * OpenNI 1.x Alpha *
4 * Copyright (C) 2012 PrimeSense Ltd. *
5 * *
6 * This file is part of OpenNI. *
7 * *
8 * Licensed under the Apache License, Version 2.0 (the "License"); *
9 * you may not use this file except in compliance with the License. *
10 * You may obtain a copy of the License at *
11 * *
12 * http://www.apache.org/licenses/LICENSE-2.0 *
13 * *
14 * Unless required by applicable law or agreed to in writing, software *
15 * distributed under the License is distributed on an "AS IS" BASIS, *
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
17 * See the License for the specific language governing permissions and *
18 * limitations under the License. *
19 * *
20 *****************************************************************************/
21 #ifndef __XN_CONTEXT_H__
22 #define __XN_CONTEXT_H__
23 
77 //---------------------------------------------------------------------------
78 // Includes
79 //---------------------------------------------------------------------------
80 #include <XnTypes.h>
81 #include <XnQueries.h>
82 #include <XnPrdNodeInfoList.h>
83 
84 //---------------------------------------------------------------------------
85 // Functions
86 //---------------------------------------------------------------------------
87 
100 XN_C_API XnStatus XN_C_DECL xnInit(XnContext** ppContext);
101 
111 XN_C_API XnStatus XN_C_DECL xnContextRunXmlScriptFromFileEx(XnContext* pContext, const XnChar* strFileName, XnEnumerationErrors* pErrors, XnNodeHandle* phScriptNode);
112 
124 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnContextRunXmlScriptFromFileEx() instead") xnContextRunXmlScriptFromFile(XnContext* pContext, const XnChar* strFileName, XnEnumerationErrors* pErrors);
125 
135 XN_C_API XnStatus XN_C_DECL xnContextRunXmlScriptEx(XnContext* pContext, const XnChar* xmlScript, XnEnumerationErrors* pErrors, XnNodeHandle* phScriptNode);
136 
148 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnContextRunXmlScriptEx() instead") XN_C_DECL xnContextRunXmlScript(XnContext* pContext, const XnChar* xmlScript, XnEnumerationErrors* pErrors);
149 
159 XN_C_API XnStatus XN_C_DECL xnInitFromXmlFileEx(const XnChar* strFileName, XnContext** ppContext, XnEnumerationErrors* pErrors, XnNodeHandle* phScriptNode);
160 
172 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnInitFromXmlFileEx() instead") XN_C_DECL xnInitFromXmlFile(const XnChar* strFileName, XnContext** ppContext, XnEnumerationErrors* pErrors);
173 
181 XN_C_API XnStatus XN_C_DECL xnContextOpenFileRecordingEx(XnContext* pContext, const XnChar* strFileName, XnNodeHandle* phPlayerNode);
182 
193 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnContextOpenFileRecordingEx() instead") XN_C_DECL xnContextOpenFileRecording(XnContext* pContext, const XnChar* strFileName);
194 
200 XN_C_API XnStatus XN_C_DECL xnContextAddRef(XnContext* pContext);
201 
208 XN_C_API void XN_C_DECL xnContextRelease(XnContext* pContext);
209 
218 XN_C_API void XN_API_DEPRECATED("Use xnContextRelease() instead") XN_C_DECL xnShutdown(XnContext* pContext);
219 
226 XN_C_API void XN_C_DECL xnForceShutdown(XnContext* pContext);
227 
232 XN_C_API XnStatus XN_C_DECL xnContextRegisterForShutdown(XnContext* pContext, XnContextShuttingDownHandler pHandler, void* pCookie, XnCallbackHandle* phCallback);
233 
238 XN_C_API void XN_C_DECL xnContextUnregisterFromShutdown(XnContext* pContext, XnCallbackHandle hCallback);
239 
240 // @}
241 
258  XnContext* pContext,
259  XnProductionNodeType Type,
260  const XnNodeQuery* pQuery,
261  XnNodeInfoList** ppTreesList,
262  XnEnumerationErrors* pErrors
263  );
264 
274  XnContext* pContext,
275  XnNodeInfo* pTree,
276  XnNodeHandle* phNode
277  );
278 
291  XnContext* pContext,
293  XnNodeQuery* pQuery,
294  XnNodeHandle* phNode,
295  XnEnumerationErrors* pErrors
296  );
297 
310  XnContext* pContext,
312  const XnChar* strName,
313  XnNodeHandle* phNode
314  );
315 
328  XnContext* pContext,
329  XnNodeHandle hOriginalNode,
330  const XnChar* strName,
331  XnNodeHandle* phMockNode
332  );
333 
340 
347 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnProductionNodeAddRef() instead.") XN_C_DECL xnRefProductionNode(XnNodeHandle hNode);
348 
355 XN_C_API void XN_C_DECL xnProductionNodeRelease(XnNodeHandle hNode);
356 
364 XN_C_API void XN_API_DEPRECATED("Please use xnProductionNodeRelease() instead.") XN_C_DECL xnUnrefProductionNode(XnNodeHandle hNode);
365 
373 XN_C_API XnStatus XN_C_DECL xnEnumerateExistingNodes(XnContext* pContext, XnNodeInfoList** ppList);
374 
384 
393  XnContext* pContext,
395  XnNodeHandle* phNode
396  );
397 
398 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnFindExistingRefNodeByType() instead") XN_C_DECL xnFindExistingNodeByType(
399  XnContext* pContext,
401  XnNodeHandle* phNode
402  );
403 
414  XnContext* pContext,
415  const XnChar* strInstanceName,
416  XnNodeHandle* phNode
417  );
418 
419 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnGetRefNodeHandleByName() instead") XN_C_DECL xnGetNodeHandleByName(
420  XnContext* pContext,
421  const XnChar* strInstanceName,
422  XnNodeHandle* phNode
423  );
424 
425 // @}
426 
437 XN_C_API XnStatus XN_C_DECL xnWaitAndUpdateAll(XnContext* pContext);
438 
445 XN_C_API XnStatus XN_C_DECL xnWaitOneUpdateAll(XnContext* pContext, XnNodeHandle hNode);
446 
452 XN_C_API XnStatus XN_C_DECL xnWaitAnyUpdateAll(XnContext* pContext);
453 
460 XN_C_API XnStatus XN_C_DECL xnWaitNoneUpdateAll(XnContext* pContext);
461 
467 XN_C_API XnStatus XN_C_DECL xnStartGeneratingAll(XnContext* pContext);
468 
474 XN_C_API XnStatus XN_C_DECL xnStopGeneratingAll(XnContext* pContext);
475 
483 XN_C_API XnStatus XN_C_DECL xnSetGlobalMirror(XnContext* pContext, XnBool bMirror);
484 
490 XN_C_API XnBool XN_C_DECL xnGetGlobalMirror(XnContext* pContext);
491 
499 XN_C_API XnStatus XN_C_DECL xnGetGlobalErrorState(XnContext* pContext);
500 
510  (XnContext* pContext, XnErrorStateChangedHandler handler,
511  void* pCookie, XnCallbackHandle* phCallback);
512 
520  (XnContext* pContext, XnCallbackHandle hCallback);
521 
531  (XnContext* pContext, XnNodeCreationHandler handler,
532  void* pCookie, XnCallbackHandle* phCallback);
533 
541  (XnContext* pContext, XnCallbackHandle hCallback);
542 
552  (XnContext* pContext, XnNodeDestructionHandler handler,
553  void* pCookie, XnCallbackHandle* phCallback);
554 
562  (XnContext* pContext, XnCallbackHandle hCallback);
563 
565 
568 #endif // __XN_CONTEXT_H__