Permalink
Browse files

Remove nyx_device_info_device_t from nyx-lib

- Add NYX_DEVICE_INFO_HARDWARE_ID into nyx_device_info_type_t to enable getting
  hardware ID using nyx_device_info_get_info
- Remove nyx_device_info_get_hardware_id function
- Update nyx-lib version to 4.0.0~rc1

Open-webOS-DCO-1.0-Signed-off-by: Pekka Ropo <pekka.ropo@palm.com>

Change-Id: Ie86806f6a0c2844bd6b405b7d4e49b75afde7ebc
  • Loading branch information...
1 parent 23e55d7 commit 5c9d72c0eda14b3fe0a757d48f6e7c8aecc7307d @pekkaropo-owo pekkaropo-owo committed Jan 11, 2013
View
@@ -24,8 +24,8 @@ cmake_minimum_required(VERSION 2.8.7)
project(nyx)
-set(NYX_API_VERSION_MAJOR 3)
-set(NYX_API_VERSION_MINOR 2)
+set(NYX_API_VERSION_MAJOR 4)
+set(NYX_API_VERSION_MINOR 0)
include(webOS/webOS)
webos_modules_init(1 0 0 QUALIFIER RC4)
@@ -1,6 +1,6 @@
/* @@@LICENSE
*
-* Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
+* Copyright (c) 2010-2013 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.
@@ -43,19 +43,6 @@ extern "C" {
*/
/**
- * @brief Get the hardware identification number.
- * This helps in identifying the hardware type of the device in use
- * from among the different available types.
- *
- * @param[in] handle - handle to the device
- * @param[out] hw_id_out_ptr - hardware type id
- *
- * @return error code (NYX_ERROR_NONE if operation is successful)
- *
- */
-NYX_API_EXPORT nyx_error_t nyx_device_info_get_hardware_id(nyx_device_handle_t handle, int32_t* hw_id_out_ptr);
-
-/**
* @brief Get the device information.
*
* @param[in] handle - handle to the device
@@ -1,6 +1,6 @@
/* @@@LICENSE
*
-* Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
+* Copyright (c) 2010-2013 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.
@@ -62,6 +62,7 @@ typedef enum {
NYX_DEVICE_INFO_STORAGE_FREE,
NYX_DEVICE_INFO_STORAGE_SIZE,
NYX_DEVICE_INFO_WIFI_ADDR,
+ NYX_DEVICE_INFO_HARDWARE_ID,
NYX_DEVICE_INFO_END
} nyx_device_info_type_t;
@@ -1,44 +0,0 @@
-/* @@@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_device_device_info_internal.h
- *
- * @brief Internal implementation of the device_info private fields
- *
- */
-
-
-#ifndef _NYX_DEVICE_DEVICE_INFO_INTERNAL_H_
-#define _NYX_DEVICE_DEVICE_INFO_INTERNAL_H_
-
-#include <nyx/module/nyx_device_internal.h>
-
-typedef struct {
- nyx_device_t original;
- char* product_name;
- char* device_name;
- int32_t hardware_id;
- char* nduid_str;
- char* serial_number;
- char* hardware_revision;
- char* ram_size_str;
- char* storage_size_str;
-} nyx_device_info_device_t;
-
-#endif /* _NYX_DEVICE_DEVICE_INFO_INTERNAL_H_ */
@@ -1,6 +1,6 @@
/* @@@LICENSE
*
-* Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
+* Copyright (c) 2010-2013 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.
@@ -30,7 +30,6 @@
#include <nyx/module/nyx_device_internal.h>
#include <nyx/module/nyx_device_haptics_internal.h>
-#include <nyx/module/nyx_device_device_info_internal.h>
#include <nyx/module/nyx_device_display_internal.h>
/**
@@ -1,6 +1,6 @@
/* @@@LICENSE
*
-* Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
+* Copyright (c) 2010-2013 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.
@@ -25,20 +25,12 @@
*******************************************************************************
*/
+#include <stdio.h>
+#include <inttypes.h>
#include "nyx_device_info_impl.h"
nyx_error_t nyx_device_info_get_info(nyx_device_handle_t handle, nyx_device_info_type_t type, char* dest, size_t dest_len)
{
nyx_execute_return_function(device_info_get_info, DEVICE_INFO, GET_INFO, handle, type, dest, dest_len);
}
-nyx_error_t nyx_device_info_get_hardware_id(nyx_device_handle_t handle, int32_t* out_hw_id)
-{
- nyx_device_t* d = (nyx_device_t*)handle;
- CHECK_DEVICE(d);
- CHECK_DEVICE_TYPE(d, NYX_DEVICE_DEVICE_INFO);
- nyx_device_info_device_t* dev = (nyx_device_info_device_t*)d;
- *out_hw_id = dev->hardware_id;
- return NYX_ERROR_NONE;
-}
-
@@ -1,6 +1,6 @@
/* @@@LICENSE
*
-* Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
+* Copyright (c) 2010-2013 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.
@@ -30,6 +30,5 @@
#include "nyx_device_impl.h"
#include <nyx/module/nyx_device_internal.h>
-#include <nyx/module/nyx_device_device_info_internal.h>
#endif /* _NYX_DEVICE_INFO_IMPL_H_ */

0 comments on commit 5c9d72c

Please sign in to comment.