summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Byrne <jack@livio.io>2015-05-05 08:54:24 -0700
committerJack Byrne <jack@livio.io>2015-05-05 08:54:24 -0700
commit2a235ad35af35af5d09147237b98d0f03c7be719 (patch)
treed1efb0d5fe28e20cc499acf3e9de7ae0b773cc34
parent7681992595e45fad49dc6922a762ee67ab11e7a5 (diff)
parent269d17a5e8b4554b90babb719545e3486feabbbf (diff)
downloadsmartdevicelink-2a235ad35af35af5d09147237b98d0f03c7be719.tar.gz
Merge branch 'feature/experimental/remote_control' of https://github.com/smartdevicelink/sdl_core into remote_control
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_interior_vehicle_data_notification.h78
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_interior_vehicle_data_notification.h86
-rw-r--r--src/components/application_manager/src/commands/hmi/on_interior_vehicle_data_notification.cc63
-rw-r--r--src/components/application_manager/src/commands/mobile/on_interior_vehicle_data_notification.cc61
4 files changed, 242 insertions, 46 deletions
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_interior_vehicle_data_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_interior_vehicle_data_notification.h
new file mode 100644
index 000000000..4fc3c15d1
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_interior_vehicle_data_notification.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2015, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_
+
+#include "application_manager/commands/hmi/notification_from_hmi.h"
+#include "application_manager/application_manager_impl.h"
+
+
+namespace application_manager {
+
+namespace commands {
+
+namespace hmi {
+
+/**
+ * @brief OnInteriorVehicleDataNotification command class
+ **/
+class OnInteriorVehicleDataNotification : public NotificationFromHMI {
+ public:
+ /**
+ * @brief OnInteriorVehicleDataNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ explicit OnInteriorVehicleDataNotification(const MessageSharedPtr& message);
+
+ /**
+ * @brief OnInteriorVehicleDataNotification class destructor
+ **/
+ virtual ~OnInteriorVehicleDataNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnInteriorVehicleDataNotification);
+};
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_interior_vehicle_data_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_interior_vehicle_data_notification.h
index bf8b39279..ad3e4b87b 100644
--- a/src/components/application_manager/include/application_manager/commands/mobile/on_interior_vehicle_data_notification.h
+++ b/src/components/application_manager/include/application_manager/commands/mobile/on_interior_vehicle_data_notification.h
@@ -1,62 +1,62 @@
/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_
+Copyright (c) 2015, Ford Motor Company
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following
+disclaimer in the documentation and/or other materials provided with the
+distribution.
+
+Neither the name of the Ford Motor Company nor the names of its contributors
+may be used to endorse or promote products derived from this software
+without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_
#include "application_manager/commands/command_notification_impl.h"
-#include "application_manager/application.h"
#include "utils/macro.h"
namespace application_manager {
namespace commands {
+namespace mobile {
+
/**
- * @brief OnVehicleDataNotification class is used to send notification
- * to mobile device that some button was pressed on HMI.
+ * @brief OnInteriorVehicleDataNotification class
**/
class OnInteriorVehicleDataNotification : public CommandNotificationImpl {
public:
/**
- * @brief OnVehicleDataNotification class constructor
+ * @brief OnInteriorVehicleDataNotification class constructor
*
* @param message Incoming SmartObject message
**/
explicit OnInteriorVehicleDataNotification(const MessageSharedPtr& message);
/**
- * @brief OnVehicleDataNotification class destructor
+ * @brief OnInteriorVehicleDataNotification class destructor
**/
virtual ~OnInteriorVehicleDataNotification();
@@ -66,17 +66,11 @@ class OnInteriorVehicleDataNotification : public CommandNotificationImpl {
virtual void Run();
private:
- /*
- * @brief Sends vehicle data notification to mobile device
- *
- * @param app Application to receive notification
- */
- void SendVehicleData(ApplicationConstSharedPtr app);
-
DISALLOW_COPY_AND_ASSIGN(OnInteriorVehicleDataNotification);
};
+} // namespace mobile
} // namespace commands
} // namespace application_manager
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_
diff --git a/src/components/application_manager/src/commands/hmi/on_interior_vehicle_data_notification.cc b/src/components/application_manager/src/commands/hmi/on_interior_vehicle_data_notification.cc
new file mode 100644
index 000000000..5da364df6
--- /dev/null
+++ b/src/components/application_manager/src/commands/hmi/on_interior_vehicle_data_notification.cc
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2015, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "application_manager/commands/hmi/on_interior_vehicle_data_notification.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace application_manager {
+
+namespace commands {
+
+namespace hmi {
+
+OnInteriorVehicleDataNotification::OnInteriorVehicleDataNotification(
+ const MessageSharedPtr& message) : NotificationFromHMI(message) {
+}
+
+OnInteriorVehicleDataNotification::~OnInteriorVehicleDataNotification() {
+}
+
+void OnInteriorVehicleDataNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ //prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ mobile_apis::FunctionID::OnInteriorVehicleDataId;
+ SendNotificationToMobile(message_);
+
+}
+
+} // namespace hmi
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_interior_vehicle_data_notification.cc b/src/components/application_manager/src/commands/mobile/on_interior_vehicle_data_notification.cc
new file mode 100644
index 000000000..552c25b26
--- /dev/null
+++ b/src/components/application_manager/src/commands/mobile/on_interior_vehicle_data_notification.cc
@@ -0,0 +1,61 @@
+/*
+
+ Copyright (c) 2015, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "application_manager/commands/mobile/on_interior_vehicle_data_notification.h"
+#include "application_manager/application_manager_impl.h"
+#include "application_manager/application_impl.h"
+
+namespace application_manager {
+
+namespace commands {
+
+namespace mobile {
+
+OnInteriorVehicleDataNotification::OnInteriorVehicleDataNotification(
+ const MessageSharedPtr& message)
+ : CommandNotificationImpl(message) {
+}
+
+OnInteriorVehicleDataNotification::~OnInteriorVehicleDataNotification() {
+}
+
+void OnInteriorVehicleDataNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ SendNotification();
+}
+
+} // namespace mobile
+
+} // namespace commands
+
+} // namespace application_manager