diff options
Diffstat (limited to 'src/components/application_manager/test/mock/include/application_manager/request_info.h')
-rw-r--r-- | src/components/application_manager/test/mock/include/application_manager/request_info.h | 78 |
1 files changed, 36 insertions, 42 deletions
diff --git a/src/components/application_manager/test/mock/include/application_manager/request_info.h b/src/components/application_manager/test/mock/include/application_manager/request_info.h index 13efe07a76..b1409488fd 100644 --- a/src/components/application_manager/test/mock/include/application_manager/request_info.h +++ b/src/components/application_manager/test/mock/include/application_manager/request_info.h @@ -1,34 +1,34 @@ -/* - * \file request_info.h - * \brief request information structure header file. - * - * Copyright (c) 2014, 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) +/** +* \file request_info.h +* \brief request information structure header file. +* +* Copyright (c) 2014, 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. */ @@ -52,21 +52,19 @@ namespace request_controller { * */ typedef utils::SharedPtr<commands::Command> RequestPtr; + typedef utils::SharedPtr<commands::CommandRequestImpl> MobileRequestPtr; struct RequestInfo { - enum RequestType {MobileRequest, HMIRequest}; - RequestInfo(const RequestType requst_type, const uint64_t timeout_sec) + RequestInfo(const uint64_t timeout_sec) : timeout_sec_(timeout_sec) { start_time_ = date_time::DateTime::getCurrentTime(); updateEndTime(); - requst_type_ = requst_type; } - RequestInfo(const RequestType requst_type, const TimevalStruct& start_time,const uint64_t timeout_sec) + RequestInfo(const TimevalStruct& start_time,const uint64_t timeout_sec) : start_time_(start_time), timeout_sec_(timeout_sec) { updateEndTime(); - requst_type_ = requst_type; } virtual ~RequestInfo(){} @@ -89,8 +87,8 @@ namespace request_controller { } bool isExpired() { - if (date_time::GREATER == - date_time::DateTime::compareTime(end_time_, date_time::DateTime::getCurrentTime())) { + if ( date_time::GREATER == + date_time::DateTime::compareTime(end_time_, date_time::DateTime::getCurrentTime()) ) { return false; } return true; @@ -115,9 +113,6 @@ namespace request_controller { mobile_apis::HMILevel::eType hmi_level() { return hmi_level_; } - RequestType requst_type() const { - return requst_type_; - } protected: TimevalStruct start_time_; @@ -125,7 +120,6 @@ namespace request_controller { TimevalStruct end_time_; uint32_t app_id_; mobile_apis::HMILevel::eType hmi_level_; - RequestType requst_type_; }; typedef utils::SharedPtr<RequestInfo> RequestInfoPtr; |