OSVR-Core
ContextC.h
Go to the documentation of this file.
1 
15 /*
16 // Copyright 2014 Sensics, Inc.
17 //
18 // Licensed under the Apache License, Version 2.0 (the "License");
19 // you may not use this file except in compliance with the License.
20 // You may obtain a copy of the License at
21 //
22 // http://www.apache.org/licenses/LICENSE-2.0
23 //
24 // Unless required by applicable law or agreed to in writing, software
25 // distributed under the License is distributed on an "AS IS" BASIS,
26 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27 // See the License for the specific language governing permissions and
28 // limitations under the License.
29 */
30 
31 #ifndef INCLUDED_ContextC_h_GUID_3790F330_2425_4486_4C9F_20C300D7DED3
32 #define INCLUDED_ContextC_h_GUID_3790F330_2425_4486_4C9F_20C300D7DED3
33 
34 /* Internal Includes */
35 #include <osvr/ClientKit/Export.h>
36 #include <osvr/Util/APIBaseC.h>
37 #include <osvr/Util/ReturnCodesC.h>
39 #include <osvr/Util/StdInt.h>
41 #include <osvr/Util/LogLevelC.h>
42 
43 /* Library/third-party includes */
44 /* none */
45 
46 /* Standard includes */
47 /* none */
48 
49 OSVR_EXTERN_C_BEGIN
50 
63 OSVR_CLIENTKIT_EXPORT OSVR_ClientContext osvrClientInit(
64  const char applicationIdentifier[], uint32_t flags OSVR_CPP_ONLY(= 0));
65 
66 
76 OSVR_CLIENTKIT_EXPORT OSVR_ClientContext
77 osvrClientInitHost(const char applicationIdentifier[],
78  const char host[],
79  uint32_t flags OSVR_CPP_ONLY(= 0));
80 
85 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientUpdate(OSVR_ClientContext ctx);
86 
100 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
102 
106 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
108 
111 OSVR_CLIENTKIT_EXPORT void osvrClientLog(OSVR_ClientContext ctx,
112  OSVR_LogLevel severity,
113  const char *message);
114 
116 OSVR_EXTERN_C_END
117 
118 #endif /* INCLUDED_ContextC_h_GUID_3790F330_2425_4486_4C9F_20C300D7DED3 */
119 
OSVR_CLIENTKIT_EXPORT void osvrClientLog(OSVR_ClientContext ctx, OSVR_LogLevel severity, const char *message)
Log a message from the client.
Definition: ContextC.cpp:95
Header declaring a type and values for simple C return codes.
Header.
Header declaring opaque types used by Client and ClientKit.
Header wrapping the C99 standard stdint header.
OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientUpdate(OSVR_ClientContext ctx)
Updates the state of the context - call regularly in your mainloop.
Definition: ContextC.cpp:80
OSVR_CLIENTKIT_EXPORT OSVR_ClientContext osvrClientInit(const char applicationIdentifier[], uint32_t flags OSVR_CPP_ONLY(=0))
Initialize the library.
Header providing basic C macros for defining API headers.
OSVR_LogLevel
Log message severity levels.
Definition: LogLevelC.h:44
OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientCheckStatus(OSVR_ClientContext ctx)
Checks to see if the client context is fully started up and connected properly to a server...
Definition: ContextC.cpp:63
Definition: ClientContext.h:50
OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientShutdown(OSVR_ClientContext ctx)
Shutdown the library.
Definition: ContextC.cpp:86
Header containing macros for source-level annotation.
OSVR_CLIENTKIT_EXPORT OSVR_ClientContext osvrClientInitHost(const char applicationIdentifier[], const char host[], uint32_t flags OSVR_CPP_ONLY(=0))
Initialize the library.