1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_TelephonyCallId_h
8 #define mozilla_dom_TelephonyCallId_h
10 #include "mozilla/dom/TelephonyCallIdBinding.h"
11 #include "mozilla/dom/telephony/TelephonyCommon.h"
13 #include "nsWrapperCache.h"
20 class TelephonyCallId MOZ_FINAL
: public nsISupports
,
24 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
25 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TelephonyCallId
)
27 TelephonyCallId(nsPIDOMWindow
* aWindow
, const nsAString
& aNumber
,
28 uint16_t aNumberPresentation
, const nsAString
& aName
,
29 uint16_t aNamePresentation
);
32 GetParentObject() const
38 WrapObject(JSContext
* aCx
) MOZ_OVERRIDE
;
43 GetNumber(nsString
& aNumber
) const
45 aNumber
.Assign(mNumber
);
49 NumberPresentation() const;
52 GetName(nsString
& aName
) const
58 NamePresentation() const;
61 UpdateNumber(const nsAString
& aNumber
)
69 nsCOMPtr
<nsPIDOMWindow
> mWindow
;
71 uint16_t mNumberPresentation
;
73 uint16_t mNamePresentation
;
76 GetPresentationStr(uint16_t aPresentation
) const;
80 } // namespace mozilla
82 #endif // mozilla_dom_TelephonyCallId_h