Ocean
devices/android/Android.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_DEVICES_ANDROID_ANDROID_H
9 #define META_OCEAN_DEVICES_ANDROID_ANDROID_H
10 
11 #include "ocean/devices/Devices.h"
12 
13 namespace Ocean
14 {
15 
16 namespace Devices
17 {
18 
19 namespace Android
20 {
21 
22 /**
23  * @ingroup devices
24  * @defgroup devicesandroid Ocean Devices Android Library
25  * @{
26  * The Ocean Devices Android Library provides device access for Android platforms.<br>
27  * The library is platform dependent.
28  * @}
29  */
30 
31 /**
32  * @namespace Ocean::Devices::Android Namespace of the Devices Android library.<p>
33  * The Namespace Ocean::Devices::Android is used in the entire Ocean Devices Android Library.
34  */
35 
36 #ifndef _ANDROID
37  #error This library is available on android platforms only!
38 #endif // _ANDROID
39 
40 // Defines OCEAN_DEVICES_ANDROID_EXPORT for dll export and import.
41 #if defined(_WINDOWS) && defined(OCEAN_RUNTIME_SHARED)
42  #ifdef USE_OCEAN_DEVICES_ANDROID_EXPORT
43  #define OCEAN_DEVICES_ANDROID_EXPORT __declspec(dllexport)
44  #else
45  #define OCEAN_DEVICES_ANDROID_EXPORT __declspec(dllimport)
46  #endif
47 #else
48  #define OCEAN_DEVICES_ANDROID_EXPORT
49 #endif
50 
51 /**
52  * Returns the name of this devices library.
53  * @ingroup devicesandroid
54  */
55 OCEAN_DEVICES_ANDROID_EXPORT std::string nameAndroidLibrary();
56 
57 #if defined(OCEAN_RUNTIME_STATIC)
58 
59 /**
60  * Registers this Android device library at the global device manager.
61  * This function calls AndroidFactory::registerFactory() only.
62  * @return True, if succeeded
63  * @ingroup devicesandroid
64  */
66 
67 /**
68  * Unregisters this Android device library at the global device manager.
69  * This function calls AndroidFactory::unregisterFactory() only.
70  * @return True, if succeeded
71  * @ingroup devicesandroid
72  */
74 
75 #endif // OCEAN_RUNTIME_STATIC
76 
77 }
78 
79 }
80 
81 }
82 
83 #endif // META_OCEAN_DEVICES_ANDROID_ANDROID_H
bool registerAndroidLibrary()
Registers this Android device library at the global device manager.
bool unregisterAndroidLibrary()
Unregisters this Android device library at the global device manager.
OCEAN_DEVICES_ANDROID_EXPORT std::string nameAndroidLibrary()
Returns the name of this devices library.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15