Home
last modified time | relevance | path

Searched refs:observer (Results 1 – 25 of 36) sorted by relevance

12

/system/bt/service/test/
Dadapter_unittest.cpp124 TestObserver observer(adapter_.get()); in TEST_F() local
138 EXPECT_EQ(bluetooth::ADAPTER_STATE_OFF, observer.prev_state()); in TEST_F()
139 EXPECT_EQ(bluetooth::ADAPTER_STATE_TURNING_ON, observer.cur_state()); in TEST_F()
150 EXPECT_EQ(bluetooth::ADAPTER_STATE_TURNING_ON, observer.prev_state()); in TEST_F()
151 EXPECT_EQ(bluetooth::ADAPTER_STATE_ON, observer.cur_state()); in TEST_F()
158 TestObserver observer(adapter_.get()); in TEST_F() local
172 EXPECT_EQ(bluetooth::ADAPTER_STATE_OFF, observer.prev_state()); in TEST_F()
173 EXPECT_EQ(bluetooth::ADAPTER_STATE_ON, observer.cur_state()); in TEST_F()
178 EXPECT_EQ(bluetooth::ADAPTER_STATE_ON, observer.prev_state()); in TEST_F()
179 EXPECT_EQ(bluetooth::ADAPTER_STATE_TURNING_OFF, observer.cur_state()); in TEST_F()
[all …]
/system/connectivity/shill/
Dproperty_observer_unittest.cc59 bool GetSavedValue(const PropertyObserver<bool>& observer) { in GetSavedValue() argument
60 return observer.saved_value_; in GetSavedValue()
70 PropertyObserver<bool> observer(bool_accessor_, in TEST_F() local
73 EXPECT_TRUE(GetSavedValue(observer)); in TEST_F()
80 observer.Update(); in TEST_F()
84 observer.Update(); in TEST_F()
91 observer.Update(); in TEST_F()
92 EXPECT_FALSE(GetSavedValue(observer)); in TEST_F()
99 observer.Update(); in TEST_F()
Dprocess_manager_unittest.cc129 CallbackObserver observer; in TEST_F() local
130 AddWatchedProcess(kPid, observer.exited_callback_); in TEST_F()
132 EXPECT_CALL(observer, OnProcessExited(kExitStatus)).Times(1); in TEST_F()
139 CallbackObserver observer; in TEST_F() local
141 new CancelableClosure(observer.termination_timeout_callback_)); in TEST_F()
144 EXPECT_CALL(observer, OnTerminationTimeout()).Times(0); in TEST_F()
/system/update_engine/update_manager/
Dvariable.h95 virtual void AddObserver(BaseVariable::ObserverInterface* observer) { in AddObserver() argument
96 if (std::find(observer_list_.begin(), observer_list_.end(), observer) == in AddObserver()
98 observer_list_.push_back(observer); in AddObserver()
102 virtual void RemoveObserver(BaseVariable::ObserverInterface* observer) { in RemoveObserver() argument
103 observer_list_.remove(observer); in RemoveObserver()
150 for (auto& observer : observer_list_copy) { in OnValueChangedNotification()
151 if (std::find(observer_list_.begin(), observer_list_.end(), observer) != in OnValueChangedNotification()
153 observer->ValueChanged(this); in OnValueChangedNotification()
Dvariable_unittest.cc100 BaseVariableObserver observer; in TEST_F() local
101 var.AddObserver(&observer); in TEST_F()
103 var.AddObserver(&observer); in TEST_F()
105 var.RemoveObserver(&observer); in TEST_F()
107 var.RemoveObserver(&observer); in TEST_F()
142 for (auto& observer : remove_observers_) { in ValueChanged() local
143 variable->RemoveObserver(observer); in ValueChanged()
148 void OnCallRemoveObserver(BaseVariable::ObserverInterface* observer) { in OnCallRemoveObserver() argument
149 remove_observers_.push_back(observer); in OnCallRemoveObserver()
Dgeneric_variables_unittest.cc197 CallCounterObserver observer; in TEST_F() local
198 var.AddObserver(&observer); in TEST_F()
199 EXPECT_EQ(0, observer.calls_count_); in TEST_F()
204 EXPECT_EQ(1, observer.calls_count_); in TEST_F()
209 EXPECT_EQ(1, observer.calls_count_); in TEST_F()
214 EXPECT_EQ(2, observer.calls_count_); in TEST_F()
219 EXPECT_EQ(2, observer.calls_count_); in TEST_F()
221 var.RemoveObserver(&observer); in TEST_F()
/system/update_engine/common/
Dprefs.cc60 for (ObserverInterface* observer : copy_observers) in SetString()
61 observer->OnPrefSet(key); in SetString()
112 for (ObserverInterface* observer : copy_observers) in Delete()
113 observer->OnPrefDeleted(key); in Delete()
118 void Prefs::AddObserver(const string& key, ObserverInterface* observer) { in AddObserver() argument
119 observers_[key].push_back(observer); in AddObserver()
122 void Prefs::RemoveObserver(const string& key, ObserverInterface* observer) { in RemoveObserver() argument
125 std::find(observers_for_key.begin(), observers_for_key.end(), observer); in RemoveObserver()
Dfake_prefs.cc102 for (ObserverInterface* observer : copy_observers) in Delete()
103 observer->OnPrefDeleted(key); in Delete()
135 for (ObserverInterface* observer : copy_observers) in SetValue()
136 observer->OnPrefSet(key); in SetValue()
151 void FakePrefs::AddObserver(const string& key, ObserverInterface* observer) { in AddObserver() argument
152 observers_[key].push_back(observer); in AddObserver()
155 void FakePrefs::RemoveObserver(const string& key, ObserverInterface* observer) { in RemoveObserver() argument
158 std::find(observers_for_key.begin(), observers_for_key.end(), observer); in RemoveObserver()
Dprefs_interface.h87 ObserverInterface* observer) = 0;
92 ObserverInterface* observer) = 0;
Dprefs.h56 ObserverInterface* observer) override;
58 ObserverInterface* observer) override;
Dcertificate_checker.h121 void SetObserver(Observer* observer) { observer_ = observer; } in SetObserver() argument
Dfake_prefs.h53 ObserverInterface* observer) override;
55 ObserverInterface* observer) override;
/system/update_engine/
Ddaemon_state_android.cc75 void DaemonStateAndroid::AddObserver(ServiceObserverInterface* observer) { in AddObserver() argument
76 service_observers_.insert(observer); in AddObserver()
79 void DaemonStateAndroid::RemoveObserver(ServiceObserverInterface* observer) { in RemoveObserver() argument
80 service_observers_.erase(observer); in RemoveObserver()
Ddaemon_state_interface.h36 virtual void AddObserver(ServiceObserverInterface* observer) = 0;
37 virtual void RemoveObserver(ServiceObserverInterface* observer) = 0;
Ddaemon_state_android.h43 void AddObserver(ServiceObserverInterface* observer) override;
44 void RemoveObserver(ServiceObserverInterface* observer) override;
Dreal_system_state.cc194 void RealSystemState::AddObserver(ServiceObserverInterface* observer) { in AddObserver() argument
196 update_attempter_->AddObserver(observer); in AddObserver()
199 void RealSystemState::RemoveObserver(ServiceObserverInterface* observer) { in RemoveObserver() argument
201 update_attempter_->RemoveObserver(observer); in RemoveObserver()
Dupdate_attempter.h240 void AddObserver(ServiceObserverInterface* observer) { in AddObserver() argument
241 service_observers_.insert(observer); in AddObserver()
243 void RemoveObserver(ServiceObserverInterface* observer) { in RemoveObserver() argument
244 service_observers_.erase(observer); in RemoveObserver()
/system/bt/service/hal/
Dfake_bluetooth_gatt_interface.cpp383 void FakeBluetoothGattInterface::AddClientObserver(ClientObserver* observer) { in AddClientObserver() argument
384 CHECK(observer); in AddClientObserver()
385 client_observers_.AddObserver(observer); in AddClientObserver()
389 ClientObserver* observer) { in RemoveClientObserver() argument
390 CHECK(observer); in RemoveClientObserver()
391 client_observers_.RemoveObserver(observer); in RemoveClientObserver()
394 void FakeBluetoothGattInterface::AddServerObserver(ServerObserver* observer) { in AddServerObserver() argument
395 CHECK(observer); in AddServerObserver()
396 server_observers_.AddObserver(observer); in AddServerObserver()
400 ServerObserver* observer) { in RemoveServerObserver() argument
[all …]
Dfake_bluetooth_interface.cpp150 void FakeBluetoothInterface::AddObserver(Observer* observer) { in AddObserver() argument
151 observers_.AddObserver(observer); in AddObserver()
154 void FakeBluetoothInterface::RemoveObserver(Observer* observer) { in RemoveObserver() argument
155 observers_.RemoveObserver(observer); in RemoveObserver()
Dfake_bluetooth_interface.h63 void AddObserver(Observer* observer) override;
64 void RemoveObserver(Observer* observer) override;
Dfake_bluetooth_gatt_interface.h135 void AddClientObserver(ClientObserver* observer) override;
136 void RemoveClientObserver(ClientObserver* observer) override;
137 void AddServerObserver(ServerObserver* observer) override;
138 void RemoveServerObserver(ServerObserver* observer) override;
Dbluetooth_gatt_interface.h248 virtual void AddClientObserver(ClientObserver* observer) = 0;
249 virtual void RemoveClientObserver(ClientObserver* observer) = 0;
253 virtual void AddServerObserver(ServerObserver* observer) = 0;
254 virtual void RemoveServerObserver(ServerObserver* observer) = 0;
Dbluetooth_interface.h101 virtual void AddObserver(Observer* observer) = 0;
102 virtual void RemoveObserver(Observer* observer) = 0;
/system/bt/service/
Dadapter.h71 virtual void AddObserver(Observer* observer) = 0;
72 virtual void RemoveObserver(Observer* observer) = 0;
/system/connectivity/shill/cellular/
Dmobile_operator_info.cc71 void MobileOperatorInfo::AddObserver(MobileOperatorInfo::Observer* observer) { in AddObserver() argument
73 impl_->AddObserver(observer); in AddObserver()
77 MobileOperatorInfo::Observer* observer) { in RemoveObserver() argument
79 impl_->RemoveObserver(observer); in RemoveObserver()

12