michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* Copyright 2012 Mozilla Foundation and Mozilla contributors michael@0: * michael@0: * Licensed under the Apache License, Version 2.0 (the "License"); michael@0: * you may not use this file except in compliance with the License. michael@0: * You may obtain a copy of the License at michael@0: * michael@0: * http://www.apache.org/licenses/LICENSE-2.0 michael@0: * michael@0: * Unless required by applicable law or agreed to in writing, software michael@0: * distributed under the License is distributed on an "AS IS" BASIS, michael@0: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. michael@0: * See the License for the specific language governing permissions and michael@0: * limitations under the License. michael@0: */ michael@0: michael@0: #ifndef _mozilla_uevent_poller_h_ michael@0: #define _mozilla_uevent_poller_h_ michael@0: michael@0: #include michael@0: #include "mozilla/Observer.h" michael@0: michael@0: class NetlinkEvent; michael@0: michael@0: namespace mozilla { michael@0: namespace hal_impl { michael@0: michael@0: typedef mozilla::Observer IUeventObserver; michael@0: michael@0: /** michael@0: * Register for uevent notification. Note that the method should run on the michael@0: * IO Thread michael@0: * @aObserver the observer to be added. The observer's Notify() is only called michael@0: * on the IO Thread michael@0: */ michael@0: void RegisterUeventListener(IUeventObserver *aObserver); michael@0: michael@0: /** michael@0: * Unregister for uevent notification. Note that the method should run on the michael@0: * IO Thread michael@0: * @aObserver the observer to be removed michael@0: */ michael@0: void UnregisterUeventListener(IUeventObserver *aObserver); michael@0: michael@0: } michael@0: } michael@0: michael@0: #endif michael@0: