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
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class CallsList final : public nsISupports,
|
2015-03-27 21:52:19 +03:00
|
|
|
public nsWrapperCache
|
2013-07-15 12:27:19 +04:00
|
|
|
{
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<Telephony> mTelephony;
|
|
|
|
RefPtr<TelephonyCallGroup> mGroup;
|
2013-07-15 12:27:19 +04:00
|
|
|
|
|
|
|
public:
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CallsList)
|
|
|
|
|
2014-09-02 02:26:43 +04:00
|
|
|
explicit CallsList(Telephony* aTelephony, TelephonyCallGroup* aGroup = nullptr);
|
2013-07-15 12:27:19 +04:00
|
|
|
|
|
|
|
nsPIDOMWindow*
|
|
|
|
GetParentObject() const;
|
|
|
|
|
|
|
|
// WrapperCache
|
|
|
|
virtual JSObject*
|
2015-03-21 19:28:04 +03:00
|
|
|
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) 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__
|