OpenNI 1.5.7
XnContext.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002 *                                                                            *
00003 *  OpenNI 1.x Alpha                                                          *
00004 *  Copyright (C) 2012 PrimeSense Ltd.                                        *
00005 *                                                                            *
00006 *  This file is part of OpenNI.                                              *
00007 *                                                                            *
00008 *  Licensed under the Apache License, Version 2.0 (the "License");           *
00009 *  you may not use this file except in compliance with the License.          *
00010 *  You may obtain a copy of the License at                                   *
00011 *                                                                            *
00012 *      http://www.apache.org/licenses/LICENSE-2.0                            *
00013 *                                                                            *
00014 *  Unless required by applicable law or agreed to in writing, software       *
00015 *  distributed under the License is distributed on an "AS IS" BASIS,         *
00016 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  *
00017 *  See the License for the specific language governing permissions and       *
00018 *  limitations under the License.                                            *
00019 *                                                                            *
00020 *****************************************************************************/
00021 #ifndef __XN_CONTEXT_H__
00022 #define __XN_CONTEXT_H__
00023 
00077 //---------------------------------------------------------------------------
00078 // Includes
00079 //---------------------------------------------------------------------------
00080 #include <XnTypes.h>
00081 #include <XnQueries.h>
00082 #include <XnPrdNodeInfoList.h>
00083 
00084 //---------------------------------------------------------------------------
00085 // Functions
00086 //---------------------------------------------------------------------------
00087 
00100 XN_C_API XnStatus XN_C_DECL xnInit(XnContext** ppContext);
00101 
00111 XN_C_API XnStatus XN_C_DECL xnContextRunXmlScriptFromFileEx(XnContext* pContext, const XnChar* strFileName, XnEnumerationErrors* pErrors, XnNodeHandle* phScriptNode);
00112 
00124 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnContextRunXmlScriptFromFileEx() instead") xnContextRunXmlScriptFromFile(XnContext* pContext, const XnChar* strFileName, XnEnumerationErrors* pErrors);
00125 
00135 XN_C_API XnStatus XN_C_DECL xnContextRunXmlScriptEx(XnContext* pContext, const XnChar* xmlScript, XnEnumerationErrors* pErrors, XnNodeHandle* phScriptNode);
00136 
00148 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnContextRunXmlScriptEx() instead") XN_C_DECL xnContextRunXmlScript(XnContext* pContext, const XnChar* xmlScript, XnEnumerationErrors* pErrors);
00149 
00159 XN_C_API XnStatus XN_C_DECL xnInitFromXmlFileEx(const XnChar* strFileName, XnContext** ppContext, XnEnumerationErrors* pErrors, XnNodeHandle* phScriptNode);
00160 
00172 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnInitFromXmlFileEx() instead") XN_C_DECL xnInitFromXmlFile(const XnChar* strFileName, XnContext** ppContext, XnEnumerationErrors* pErrors);
00173 
00181 XN_C_API XnStatus XN_C_DECL xnContextOpenFileRecordingEx(XnContext* pContext, const XnChar* strFileName, XnNodeHandle* phPlayerNode);
00182 
00193 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnContextOpenFileRecordingEx() instead") XN_C_DECL xnContextOpenFileRecording(XnContext* pContext, const XnChar* strFileName);
00194 
00200 XN_C_API XnStatus XN_C_DECL xnContextAddRef(XnContext* pContext);
00201 
00208 XN_C_API void XN_C_DECL xnContextRelease(XnContext* pContext);
00209 
00218 XN_C_API void XN_API_DEPRECATED("Use xnContextRelease() instead") XN_C_DECL xnShutdown(XnContext* pContext);
00219 
00226 XN_C_API void XN_C_DECL xnForceShutdown(XnContext* pContext);
00227 
00232 XN_C_API XnStatus XN_C_DECL xnContextRegisterForShutdown(XnContext* pContext, XnContextShuttingDownHandler pHandler, void* pCookie, XnCallbackHandle* phCallback);
00233 
00238 XN_C_API void XN_C_DECL xnContextUnregisterFromShutdown(XnContext* pContext, XnCallbackHandle hCallback);
00239 
00240 // @}
00241 
00257 XN_C_API XnStatus XN_C_DECL xnEnumerateProductionTrees(
00258     XnContext* pContext,
00259     XnProductionNodeType Type, 
00260     const XnNodeQuery* pQuery,
00261     XnNodeInfoList** ppTreesList,
00262     XnEnumerationErrors* pErrors
00263     );
00264 
00273 XN_C_API XnStatus XN_C_DECL xnCreateProductionTree(
00274      XnContext* pContext,
00275      XnNodeInfo* pTree,
00276      XnNodeHandle* phNode
00277      );
00278 
00290 XN_C_API XnStatus XN_C_DECL xnCreateAnyProductionTree(
00291     XnContext* pContext,
00292     XnProductionNodeType type,
00293     XnNodeQuery* pQuery,
00294     XnNodeHandle* phNode,
00295     XnEnumerationErrors* pErrors
00296     );
00297 
00309 XN_C_API XnStatus XN_C_DECL xnCreateMockNode(
00310     XnContext* pContext, 
00311     XnProductionNodeType type,
00312     const XnChar* strName,
00313     XnNodeHandle* phNode
00314     );
00315 
00327 XN_C_API XnStatus XN_C_DECL xnCreateMockNodeBasedOn(
00328     XnContext* pContext,
00329     XnNodeHandle hOriginalNode,
00330     const XnChar* strName,
00331     XnNodeHandle* phMockNode
00332     );
00333 
00339 XN_C_API XnStatus XN_C_DECL xnProductionNodeAddRef(XnNodeHandle hNode);
00340 
00347 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnProductionNodeAddRef() instead.") XN_C_DECL xnRefProductionNode(XnNodeHandle hNode);
00348 
00355 XN_C_API void XN_C_DECL xnProductionNodeRelease(XnNodeHandle hNode);
00356 
00364 XN_C_API void XN_API_DEPRECATED("Please use xnProductionNodeRelease() instead.") XN_C_DECL xnUnrefProductionNode(XnNodeHandle hNode);
00365 
00373 XN_C_API XnStatus XN_C_DECL xnEnumerateExistingNodes(XnContext* pContext, XnNodeInfoList** ppList);
00374 
00383 XN_C_API XnStatus XN_C_DECL xnEnumerateExistingNodesByType(XnContext* pContext, XnProductionNodeType type, XnNodeInfoList** ppList);
00384 
00392 XN_C_API XnStatus XN_C_DECL xnFindExistingRefNodeByType(
00393     XnContext* pContext,
00394     XnProductionNodeType type,
00395     XnNodeHandle* phNode
00396     );
00397 
00398 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnFindExistingRefNodeByType() instead") XN_C_DECL xnFindExistingNodeByType(
00399     XnContext* pContext,
00400     XnProductionNodeType type,
00401     XnNodeHandle* phNode
00402     );
00403 
00413 XN_C_API XnStatus XN_C_DECL xnGetRefNodeHandleByName(
00414     XnContext* pContext,
00415     const XnChar* strInstanceName,
00416     XnNodeHandle* phNode
00417     );
00418 
00419 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnGetRefNodeHandleByName() instead") XN_C_DECL xnGetNodeHandleByName(
00420     XnContext* pContext,
00421     const XnChar* strInstanceName,
00422     XnNodeHandle* phNode
00423     );
00424 
00425 // @}
00426 
00437 XN_C_API XnStatus XN_C_DECL xnWaitAndUpdateAll(XnContext* pContext);
00438 
00445 XN_C_API XnStatus XN_C_DECL xnWaitOneUpdateAll(XnContext* pContext, XnNodeHandle hNode);
00446 
00452 XN_C_API XnStatus XN_C_DECL xnWaitAnyUpdateAll(XnContext* pContext);
00453 
00460 XN_C_API XnStatus XN_C_DECL xnWaitNoneUpdateAll(XnContext* pContext);
00461 
00467 XN_C_API XnStatus XN_C_DECL xnStartGeneratingAll(XnContext* pContext);
00468 
00474 XN_C_API XnStatus XN_C_DECL xnStopGeneratingAll(XnContext* pContext);
00475 
00483 XN_C_API XnStatus XN_C_DECL xnSetGlobalMirror(XnContext* pContext, XnBool bMirror);
00484 
00490 XN_C_API XnBool XN_C_DECL xnGetGlobalMirror(XnContext* pContext);
00491 
00499 XN_C_API XnStatus XN_C_DECL xnGetGlobalErrorState(XnContext* pContext);
00500 
00509 XN_C_API XnStatus XN_C_DECL xnRegisterToGlobalErrorStateChange
00510     (XnContext* pContext, XnErrorStateChangedHandler handler,
00511     void* pCookie, XnCallbackHandle* phCallback);
00512 
00519 XN_C_API void XN_C_DECL xnUnregisterFromGlobalErrorStateChange
00520     (XnContext* pContext, XnCallbackHandle hCallback);
00521 
00530 XN_C_API XnStatus XN_C_DECL xnRegisterToNodeCreation
00531     (XnContext* pContext, XnNodeCreationHandler handler,
00532     void* pCookie, XnCallbackHandle* phCallback);
00533 
00540 XN_C_API void XN_C_DECL xnUnregisterFromNodeCreation
00541     (XnContext* pContext, XnCallbackHandle hCallback);
00542 
00551 XN_C_API XnStatus XN_C_DECL xnRegisterToNodeDestruction
00552     (XnContext* pContext, XnNodeDestructionHandler handler,
00553     void* pCookie, XnCallbackHandle* phCallback);
00554 
00561 XN_C_API void XN_C_DECL xnUnregisterFromNodeDestruction
00562     (XnContext* pContext, XnCallbackHandle hCallback);
00563 
00565 
00568 #endif // __XN_CONTEXT_H__