2013-07-15 12:27:19 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_telephony_CallsList_h__
|
|
|
|
#define mozilla_dom_telephony_CallsList_h__
|
|
|
|
|
2013-09-12 07:47:14 +04:00
|
|
|
#include "mozilla/dom/telephony/TelephonyCommon.h"
|
2013-07-15 12:27:19 +04:00
|
|
|
|
|
|
|
#include "nsWrapperCache.h"
|
|
|
|
|
2013-09-12 07:47:14 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
2013-07-15 12:27:19 +04:00
|
|
|
|
|
|
|
class CallsList MOZ_FINAL : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
nsRefPtr<Telephony> mTelephony;
|
2013-07-06 14:24:55 +04:00
|
|
|
nsRefPtr<TelephonyCallGroup> mGroup;
|
2013-07-15 12:27:19 +04:00
|
|
|
|
|
|
|
public:
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CallsList)
|
|
|
|
|
2013-07-06 14:24:55 +04:00
|
|
|
CallsList(Telephony* aTelephony, TelephonyCallGroup* aGroup = nullptr);
|
2013-07-15 12:27:19 +04:00
|
|
|
|
|
|
|
nsPIDOMWindow*
|
|
|
|
GetParentObject() const;
|
|
|
|
|
|
|
|
// WrapperCache
|
|
|
|
virtual JSObject*
|
2014-04-09 02:27:18 +04:00
|
|
|
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
2013-07-15 12:27:19 +04:00
|
|
|
|
|
|
|
// CallsList WebIDL
|
|
|
|
already_AddRefed<TelephonyCall>
|
|
|
|
Item(uint32_t aIndex) const;
|
|
|
|
|
|
|
|
uint32_t
|
|
|
|
Length() const;
|
|
|
|
|
|
|
|
already_AddRefed<TelephonyCall>
|
|
|
|
IndexedGetter(uint32_t aIndex, bool& aFound) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
~CallsList();
|
|
|
|
};
|
|
|
|
|
2013-09-12 07:47:14 +04:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2013-07-15 12:27:19 +04:00
|
|
|
|
|
|
|
#endif // mozilla_dom_telephony_CallsList_h__
|