1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/telephony/ipc/TelephonyIPCProvider.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,46 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef mozilla_dom_telephony_TelephonyIPCProvider_h 1.10 +#define mozilla_dom_telephony_TelephonyIPCProvider_h 1.11 + 1.12 +#include "mozilla/dom/telephony/TelephonyCommon.h" 1.13 +#include "mozilla/Attributes.h" 1.14 +#include "nsIObserver.h" 1.15 +#include "nsITelephonyProvider.h" 1.16 + 1.17 +BEGIN_TELEPHONY_NAMESPACE 1.18 + 1.19 +struct IPCTelephonyRequest; 1.20 +class PTelephonyChild; 1.21 + 1.22 +class TelephonyIPCProvider MOZ_FINAL : public nsITelephonyProvider 1.23 + , public nsITelephonyListener 1.24 + , public nsIObserver 1.25 +{ 1.26 +public: 1.27 + NS_DECL_ISUPPORTS 1.28 + NS_DECL_NSITELEPHONYPROVIDER 1.29 + NS_DECL_NSITELEPHONYLISTENER 1.30 + NS_DECL_NSIOBSERVER 1.31 + 1.32 + TelephonyIPCProvider(); 1.33 + 1.34 +protected: 1.35 + virtual ~TelephonyIPCProvider(); 1.36 + 1.37 +private: 1.38 + nsTArray<nsCOMPtr<nsITelephonyListener> > mListeners; 1.39 + PTelephonyChild* mPTelephonyChild; 1.40 + uint32_t mDefaultServiceId; 1.41 + 1.42 + nsresult SendRequest(nsITelephonyListener *aListener, 1.43 + nsITelephonyCallback *aCallback, 1.44 + const IPCTelephonyRequest& aRequest); 1.45 +}; 1.46 + 1.47 +END_TELEPHONY_NAMESPACE 1.48 + 1.49 +#endif // mozilla_dom_telephony_TelephonyIPCProvider_h