tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

InterfaceC.h (2100B)


      1 /** @file
      2    @brief Header
      3 
      4    Must be c-safe!
      5 
      6    @date 2014
      7 
      8    @author
      9    Sensics, Inc.
     10    <http://sensics.com/osvr>
     11 */
     12 
     13 /*
     14 // Copyright 2014 Sensics, Inc.
     15 //
     16 // Licensed under the Apache License, Version 2.0 (the "License");
     17 // you may not use this file except in compliance with the License.
     18 // You may obtain a copy of the License at
     19 //
     20 //     http://www.apache.org/licenses/LICENSE-2.0
     21 //
     22 // Unless required by applicable law or agreed to in writing, software
     23 // distributed under the License is distributed on an "AS IS" BASIS,
     24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     25 // See the License for the specific language governing permissions and
     26 // limitations under the License.
     27 */
     28 
     29 #ifndef INCLUDED_InterfaceC_h_GUID_D90BBAA6_AD62_499D_C023_2F6ED8987C17
     30 #define INCLUDED_InterfaceC_h_GUID_D90BBAA6_AD62_499D_C023_2F6ED8987C17
     31 
     32 /* Internal Includes */
     33 #include <osvr/ClientKit/Export.h>
     34 #include <osvr/Util/APIBaseC.h>
     35 #include <osvr/Util/ReturnCodesC.h>
     36 #include <osvr/Util/AnnotationMacrosC.h>
     37 #include <osvr/Util/ClientOpaqueTypesC.h>
     38 
     39 /* Library/third-party includes */
     40 /* none */
     41 
     42 /* Standard includes */
     43 /* none */
     44 
     45 OSVR_EXTERN_C_BEGIN
     46 /** @addtogroup ClientKit
     47 @{
     48 */
     49 
     50 /** @brief Get the interface associated with the given path.
     51    @param ctx Client context
     52    @param path A resource path (null-terminated string)
     53    @param[out] iface The interface object. May be freed when no longer needed,
     54   otherwise it will be freed when the context is closed.
     55 */
     56 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetInterface(
     57    OSVR_ClientContext ctx, const char path[], OSVR_ClientInterface* iface);
     58 
     59 /** @brief Free an interface object before context closure.
     60 
     61    @param ctx Client context
     62    @param iface The interface object
     63 
     64    @returns OSVR_RETURN_SUCCESS unless a null context or interface was passed
     65   or the given interface was not found in the context (i.e. had already been
     66   freed)
     67 */
     68 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
     69 osvrClientFreeInterface(OSVR_ClientContext ctx, OSVR_ClientInterface iface);
     70 
     71 /** @} */
     72 OSVR_EXTERN_C_END
     73 
     74 #endif