2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef WATCH_HOLDER_BASE_SRC_AMBIENT_LISTENER_HH_
18 #define WATCH_HOLDER_BASE_SRC_AMBIENT_LISTENER_HH_
20 #include <bundle_cpp.h>
21 #include <aul_app_com.h>
27 namespace watch_holder {
29 class AmbientListener {
43 virtual ~AmbientListener();
44 static int OnAmbientChangedSignal(const char *endpoint,
45 aul_app_com_result_e e, bundle *envelope, void *user_data);
46 static int OnReceiveSignal(const char* endpoint, aul_app_com_result_e e,
47 bundle* envelope, void* user_data);
49 virtual void OnAmbientChanged(bool enter,
50 const tizen_base::Bundle& extra) = 0;
51 virtual void OnAmbientEvent(EventType ev, std::string sender,
52 tizen_base::Bundle extra) = 0;
55 aul_app_com_connection_h ambient_changed_signal_conn_ = nullptr;
56 aul_app_com_connection_h ambient_event_signal_conn_ = nullptr;
59 } // namespace watch_holder
61 #endif // WATCH_HOLDER_BASE_SRC_AMBIENT_LISTENER_HH_