Permalink
Browse files

Release nyx-lib 2.0.0-rc1 to the public

  • Loading branch information...
Damian Kowalewski
Damian Kowalewski committed Mar 19, 2012
0 parents commit ee1d7d8b3062a5cfe0073ae3b162ec9c156e5065
Showing with 9,561 additions and 0 deletions.
  1. +18 −0 .gitignore
  2. +26 −0 README.md
  3. +173 −0 doc/Doxyfile
  4. +5 −0 doc/create_docs.sh
  5. +107 −0 include/nyx/client/nyx_battery.h
  6. +62 −0 include/nyx/client/nyx_bluetooth_input_detect.h
  7. +128 −0 include/nyx/client/nyx_charger.h
  8. +78 −0 include/nyx/client/nyx_device_info.h
  9. +52 −0 include/nyx/client/nyx_display.h
  10. +127 −0 include/nyx/client/nyx_firmware_update.h
  11. +130 −0 include/nyx/client/nyx_haptics.h
  12. +100 −0 include/nyx/client/nyx_keys.h
  13. +72 −0 include/nyx/client/nyx_led.h
  14. +98 −0 include/nyx/client/nyx_led_controller.h
  15. +383 −0 include/nyx/client/nyx_led_controller_core_configuration.h
  16. +62 −0 include/nyx/client/nyx_sensor_acceleration.h
  17. +61 −0 include/nyx/client/nyx_sensor_als.h
  18. +63 −0 include/nyx/client/nyx_sensor_angular_velocity.h
  19. +83 −0 include/nyx/client/nyx_sensor_bearing.h
  20. +63 −0 include/nyx/client/nyx_sensor_gravity.h
  21. +63 −0 include/nyx/client/nyx_sensor_linear_acceleration.h
  22. +63 −0 include/nyx/client/nyx_sensor_magnetic_field.h
  23. +85 −0 include/nyx/client/nyx_sensor_orientation.h
  24. +63 −0 include/nyx/client/nyx_sensor_proximity.h
  25. +63 −0 include/nyx/client/nyx_sensor_rotation.h
  26. +63 −0 include/nyx/client/nyx_sensor_shake.h
  27. +234 −0 include/nyx/client/nyx_system.h
  28. +143 −0 include/nyx/client/nyx_touchpanel.h
  29. +75 −0 include/nyx/common/nyx_battery_common.h
  30. +65 −0 include/nyx/common/nyx_bluetooth_input_detect_common.h
  31. +94 −0 include/nyx/common/nyx_charger_common.h
  32. +93 −0 include/nyx/common/nyx_core.h
  33. +323 −0 include/nyx/common/nyx_device.h
  34. +78 −0 include/nyx/common/nyx_device_info_common.h
  35. +48 −0 include/nyx/common/nyx_display_common.h
  36. +74 −0 include/nyx/common/nyx_error.h
  37. +77 −0 include/nyx/common/nyx_event.h
  38. +66 −0 include/nyx/common/nyx_firmware_update_common.h
  39. +82 −0 include/nyx/common/nyx_haptics_common.h
  40. +98 −0 include/nyx/common/nyx_keys_common.h
  41. +104 −0 include/nyx/common/nyx_led_controller_common.h
  42. +152 −0 include/nyx/common/nyx_led_controller_core_configuration_common.h
  43. +49 −0 include/nyx/common/nyx_macros.h
  44. +56 −0 include/nyx/common/nyx_sensor_acceleration_common.h
  45. +57 −0 include/nyx/common/nyx_sensor_angular_velocity_common.h
  46. +65 −0 include/nyx/common/nyx_sensor_bearing_common.h
  47. +58 −0 include/nyx/common/nyx_sensor_gravity_common.h
  48. +59 −0 include/nyx/common/nyx_sensor_linear_acceleration_common.h
  49. +59 −0 include/nyx/common/nyx_sensor_magnetic_field_common.h
  50. +77 −0 include/nyx/common/nyx_sensor_orientation_common.h
  51. +74 −0 include/nyx/common/nyx_sensor_rotation_common.h
  52. +61 −0 include/nyx/common/nyx_sensor_shake_common.h
  53. +111 −0 include/nyx/common/nyx_system_common.h
  54. +90 −0 include/nyx/common/nyx_touchpanel_common.h
  55. +43 −0 include/nyx/module/nyx_device_device_info_internal.h
  56. +38 −0 include/nyx/module/nyx_device_display_internal.h
  57. +43 −0 include/nyx/module/nyx_device_haptics_internal.h
  58. +205 −0 include/nyx/module/nyx_device_internal.h
  59. +111 −0 include/nyx/module/nyx_event_internal.h
  60. +43 −0 include/nyx/module/nyx_event_sensor_als_internal.h
  61. +42 −0 include/nyx/module/nyx_event_sensor_proximity_internal.h
  62. +42 −0 include/nyx/module/nyx_event_touchpanel_internal.h
  63. +86 −0 include/nyx/module/nyx_log.h
  64. +115 −0 include/nyx/module/nyx_module_internal.h
  65. +71 −0 include/nyx/module/nyx_utils.h
  66. +67 −0 include/nyx/nyx_client.h
  67. +63 −0 include/nyx/nyx_module.h
  68. +93 −0 src/CMakeLists.txt
  69. +43 −0 src/CMakeModules/FindGlib2.cmake
  70. +121 −0 src/CMakeModules/LibFindMacros.cmake
  71. +24 −0 src/config/nyx_config.h.in
  72. +25 −0 src/config/nyx_version.h.in
  73. +31 −0 src/core/CMakeLists.txt
  74. +146 −0 src/core/nyx_core_impl.c
  75. +38 −0 src/core/nyx_core_impl.h
  76. +76 −0 src/core/nyx_impl.c
  77. +29 −0 src/core/nyx_impl.h
  78. +50 −0 src/device/CMakeLists.txt
  79. +51 −0 src/device/nyx_battery_impl.c
  80. +39 −0 src/device/nyx_bluetooth_input_detect_impl.c
  81. +33 −0 src/device/nyx_bluetooth_input_detect_impl.h
  82. +60 −0 src/device/nyx_charger_impl.c
  83. +458 −0 src/device/nyx_device_impl.c
  84. +69 −0 src/device/nyx_device_impl.h
  85. +44 −0 src/device/nyx_device_info_impl.c
  86. +35 −0 src/device/nyx_device_info_impl.h
  87. +41 −0 src/device/nyx_display_impl.c
  88. +33 −0 src/device/nyx_display_impl.h
  89. +55 −0 src/device/nyx_firmware_update_impl.c
  90. +34 −0 src/device/nyx_firmware_update_impl.h
  91. +82 −0 src/device/nyx_haptics_impl.c
  92. +35 −0 src/device/nyx_haptics_impl.h
  93. +62 −0 src/device/nyx_keys_impl.c
  94. +34 −0 src/device/nyx_keys_impl.h
  95. +304 −0 src/device/nyx_led_controller_core_configuration_impl.c
  96. +34 −0 src/device/nyx_led_controller_core_configuration_impl.h
  97. +49 −0 src/device/nyx_led_controller_impl.c
  98. +33 −0 src/device/nyx_led_controller_impl.h
  99. +39 −0 src/device/nyx_led_impl.c
  100. +34 −0 src/device/nyx_led_impl.h
  101. +41 −0 src/device/nyx_sensor_acceleration_impl.c
  102. +40 −0 src/device/nyx_sensor_als_impl.c
  103. +41 −0 src/device/nyx_sensor_angular_velocity_impl.c
  104. +65 −0 src/device/nyx_sensor_bearing_impl.c
  105. +41 −0 src/device/nyx_sensor_gravity_impl.c
  106. +41 −0 src/device/nyx_sensor_linear_acceleration_impl.c
  107. +40 −0 src/device/nyx_sensor_magnetic_field_impl.c
  108. +66 −0 src/device/nyx_sensor_orientation_impl.c
  109. +40 −0 src/device/nyx_sensor_proximity_impl.c
  110. +41 −0 src/device/nyx_sensor_rotation_impl.c
  111. +41 −0 src/device/nyx_sensor_shake_impl.c
  112. +81 −0 src/device/nyx_system_impl.c
  113. +123 −0 src/device/nyx_touchpanel_impl.c
  114. +34 −0 src/device/nyx_touchpanel_impl.h
  115. +65 −0 src/lib.cmake
  116. +66 −0 src/nyx.cmake
  117. +28 −0 src/target/rockhopper/CMakeLists.txt
  118. +29 −0 src/target/ubuntu/CMakeLists.txt
  119. +21 −0 src/utils/CMakeLists.txt
  120. +95 −0 src/utils/nyx_async.c
  121. +83 −0 src/utils/nyx_file_io.c
  122. +223 −0 src/utils/nyx_log.c
@@ -0,0 +1,18 @@
+cscope.out
+*.so
+*.o
+*.d
+*.so
+.cscope.files
+.sc_status
+*.swp
+Debug/
+.project
+.cproject
+/patches
+build*
+BUILD-*
+doc/html
+*.DS_Store
+include/nyx/common/nyx_version.h
+src/config/nyx_config.h
@@ -0,0 +1,26 @@
+nyx-lib
+=======
+
+Nyx is the webOS portability layer used to isolate the remainder of webOS from dependencies on the hardware and core OS upon which it is running. It is implemented as a shared library that exposes a uniform client API and that expects to call into a series of platform-dependent modules that implement the API for a particular device.
+
+This is the repository for nyx-lib, the shared library.
+
+# Copyright and License Information
+
+All content, including all source code files and documentation files in this repository are:
+
+ Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
+
+All content, including all source code files and documentation files in this repository are:
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this content except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
@@ -0,0 +1,173 @@
+# Doxyfile 0.1
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = NYX
+PROJECT_NUMBER = 2.0.0
+OUTPUT_DIRECTORY = .
+OUTPUT_LANGUAGE = English
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = YES
+EXTRACT_STATIC = YES
+EXTRACT_LOCAL_CLASSES = NO
+EXTRACT_LOCAL_METHODS = NO
+HIDE_UNDOC_MEMBERS = YES
+HIDE_UNDOC_CLASSES = YES
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ALWAYS_DETAILED_SEC = NO
+FULL_PATH_NAMES = NO
+STRIP_FROM_PATH =
+INTERNAL_DOCS = YES
+STRIP_CODE_COMMENTS = YES
+CASE_SENSE_NAMES = YES
+SHORT_NAMES = NO
+HIDE_SCOPE_NAMES = NO
+VERBATIM_HEADERS = YES
+SHOW_INCLUDE_FILES = YES
+JAVADOC_AUTOBRIEF = YES
+INHERIT_DOCS = YES
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = YES
+DISTRIBUTE_GROUP_DOC = NO
+TAB_SIZE = 4
+GENERATE_TODOLIST = NO
+GENERATE_TESTLIST = NO
+GENERATE_BUGLIST = NO
+ALIASES =
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+OPTIMIZE_OUTPUT_FOR_C = YES
+SHOW_USED_FILES = NO
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = YES
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_FORMAT =
+WARN_LOGFILE =
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = ../include/nyx
+FILE_PATTERNS = *.c *.h
+RECURSIVE = YES
+EXCLUDE =
+EXCLUDE_PATTERNS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+EXAMPLE_PATTERNS =
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_SOURCE_FILES = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = YES
+INLINE_SOURCES = NO
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = NO
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = YES
+HTML_OUTPUT =
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = NO
+GENERATE_CHI = NO
+BINARY_TOC = NO
+TOC_EXPAND = NO
+DISABLE_INDEX = NO
+ENUM_VALUES_PER_LINE = 1
+GENERATE_TREEVIEW = YES
+TREEVIEW_WIDTH = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = NO
+LATEX_OUTPUT =
+COMPACT_LATEX = NO
+PAPER_TYPE = a4wide
+EXTRA_PACKAGES =
+LATEX_HEADER =
+PDF_HYPERLINKS = NO
+USE_PDFLATEX = NO
+LATEX_BATCHMODE = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = NO
+RTF_OUTPUT =
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_LINKS = YES
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = NO
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = YES
+EXPAND_ONLY_PREDEF = YES
+SEARCH_INCLUDES = YES
+INCLUDE_PATH = ../include/nyx
+INCLUDE_FILE_PATTERNS = *.h
+PREDEFINED =
+SKIP_FUNCTION_MACROS = YES
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE =
+ALLEXTERNALS = NO
+PERL_PATH =
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = YES
+HAVE_DOT = YES
+DOT_TRANSPARENT = YES
+CALL_GRAPH = YES
+CLASS_GRAPH = YES
+GROUP_GRAPHS = YES
+COLLABORATION_GRAPH = YES
+TEMPLATE_RELATIONS = YES
+HIDE_UNDOC_RELATIONS = YES
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+GRAPHICAL_HIERARCHY = YES
+GENERATE_LEGEND = YES
+DOT_PATH =
+DOTFILE_DIRS =
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
+#---------------------------------------------------------------------------
+# Configuration::addtions related to the search engine
+#---------------------------------------------------------------------------
+SEARCHENGINE = YES
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+echo "Generating doxygen docs..."
+doxygen ./Doxyfile &> /dev/null
+echo "Done!"
@@ -0,0 +1,107 @@
+/* @@@LICENSE
+*
+* Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* LICENSE@@@ */
+
+/**
+ * @file nyx_battery.h
+ *
+ * @brief Nyx's public battery API.
+ *
+ */
+
+#ifndef _NYX_BATTERY_H_
+#define _NYX_BATTERY_H_
+
+#include <nyx/common/nyx_battery_common.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+* @defgroup nyx_battery_public Battery
+* @ingroup nyx_public
+* @{
+*/
+
+/**
+ * @brief Query battery status.
+ *
+ * @param[in] handle - the event handle
+ * @param[out] status_out_ptr - current battery readings (needs to be allocated by caller)
+ *
+ * @return error code (NYX_ERROR_NONE if operation is successful)
+ *
+ */
+NYX_API_EXPORT nyx_error_t nyx_battery_query_battery_status(nyx_device_handle_t handle, nyx_battery_status_t *status_out_ptr);
+
+
+/**
+ * @brief Register callback function for any change in battery status.
+ *
+ * @param[in] handle - the event handle
+ * @param[in] callback_func - the callback function to handle the event
+ * @param[in] context - for callback function
+ *
+ * @return error code (NYX_ERROR_NONE if operation is successful
+ *
+ */
+NYX_API_EXPORT nyx_error_t nyx_battery_register_battery_status_callback(nyx_device_handle_t handle, nyx_device_callback callback_func, void *context);
+
+
+/**
+ * @brief Authenticate battery.
+ *
+ * @param[in] handle - the device handle
+ * @param[out] result - authentication result (true/false).
+ *
+ * @return error code (NYX_ERROR_NONE if operation is successful)
+ *
+ */
+
+NYX_API_EXPORT nyx_error_t nyx_battery_authenticate_battery(nyx_device_handle_t handle, bool *result);
+
+/**
+ * @brief Get CTIA parameters for the battery.
+ *
+ * @param[in] handle - the device handle
+ * @param[out] param - CTIA parameters
+ *
+ * @return error code (NYX_ERROR_NONE if operation is successful)
+ *
+ */
+
+NYX_API_EXPORT nyx_error_t nyx_battery_get_ctia_parameters(nyx_device_handle_t handle, nyx_battery_ctia_t *param);
+
+/**
+ * @brief Set battery percentage at which to wake up the device if it suspends.
+ *
+ * @param[in] handle - the device handle
+ * @param[in] percentage - battery percentage at which to wake up
+ *
+ * @return error code (NYX_ERROR_NONE if operation is successful)
+ *
+ */
+
+NYX_API_EXPORT nyx_error_t nyx_battery_set_wakeup_percentage(nyx_device_handle_t handle, int32_t percentage);
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _NYX_BATTERY_H_ */
@@ -0,0 +1,62 @@
+/* @@@LICENSE
+*
+* Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* LICENSE@@@ */
+
+/**
+ * @file nyx_bluetooth_input_detect.h
+ *
+ */
+
+/**
+ * @brief Nyx's public API for accessing a bluetooth input detection device
+ * and the events it generates.
+ *
+ */
+
+#ifndef _NYX_BLUETOOTH_INPUT_DETECT_H_
+#define _NYX_BLUETOOTH_INPUT_DETECT_H_
+
+#include <nyx/common/nyx_device.h>
+#include <nyx/common/nyx_bluetooth_input_detect_common.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+* @defgroup nyx_bluetooth_input_detect_public Bluetooth Input Detection
+* @ingroup nyx_public
+* @{
+*/
+
+/**
+ * Get the data associated with the nyx_bluetooth_input_detect event.
+ *
+ * @param[in] handle - the event handle
+ * @param[out] item_out_ptr - pointer to bluetooth_input_detect_event_item of ALS event
+ *
+ * @return error code (NYX_ERROR_NONE if operation is successful)
+ *
+ */
+NYX_API_EXPORT nyx_error_t nyx_bluetooth_input_detect_event_get_data(nyx_event_handle_t handle, nyx_bluetooth_input_detect_event_item_t* item_out_ptr);
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _NYX_BLUETOOTH_INPUT_DETECT_H_ */
Oops, something went wrong.

0 comments on commit ee1d7d8

Please sign in to comment.