OSVR-Core
RegisterShutdownHandler.h
Go to the documentation of this file.
1 
13 // Copyright 2014 Sensics, Inc.
14 //
15 // Licensed under the Apache License, Version 2.0 (the "License");
16 // you may not use this file except in compliance with the License.
17 // You may obtain a copy of the License at
18 //
19 // http://www.apache.org/licenses/LICENSE-2.0
20 //
21 // Unless required by applicable law or agreed to in writing, software
22 // distributed under the License is distributed on an "AS IS" BASIS,
23 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24 // See the License for the specific language governing permissions and
25 // limitations under the License.
26 
27 #ifndef INCLUDED_RegisterShutdownHandler_h_GUID_3663ABF6_8788_4BB7_CA9F_3609E2EC7009
28 #define INCLUDED_RegisterShutdownHandler_h_GUID_3663ABF6_8788_4BB7_CA9F_3609E2EC7009
29 
30 // Internal Includes
31 // - none
32 
33 // Library/third-party includes
34 // - none
35 
36 // Standard includes
37 // - none
38 
39 namespace osvr {
40 namespace server {
42  typedef void (*ShutdownHandler)();
43 } // namespace server
44 } // namespace osvr
45 
46 #if !defined(OSVR_USE_WIN32_SHUTDOWN_HANDLER) && \
47  !defined(OSVR_USE_POSIX_SIGNAL_SHUTDOWN_HANDLER)
48 
49 #ifdef _WIN32
50 #define OSVR_USE_WIN32_SHUTDOWN_HANDLER
51 #else
52 #define OSVR_USE_POSIX_SIGNAL_SHUTDOWN_HANDLER
54 #endif
55 
56 #endif // !defined any config flag
57 
58 #if defined(OSVR_USE_WIN32_SHUTDOWN_HANDLER)
60 
61 #elif defined(OSVR_USE_POSIX_SIGNAL_SHUTDOWN_HANDLER)
63 #endif
64 
65 #endif // INCLUDED_RegisterShutdownHandler_h_GUID_3663ABF6_8788_4BB7_CA9F_3609E2EC7009
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
Implementation header included by RegisterShutdownHandler.h on Win32 platforms.
Implementation header included by RegisterShutdownHandler.h on platforms providing signal()...
void(* ShutdownHandler)()
The type of a shutdown handler callback.
Definition: RegisterShutdownHandler.h:42