dom/telephony/CallsList.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/telephony/CallsList.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,53 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* vim: set ts=8 sts=2 et sw=2 tw=80: */
     1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef mozilla_dom_telephony_CallsList_h__
    1.11 +#define mozilla_dom_telephony_CallsList_h__
    1.12 +
    1.13 +#include "mozilla/dom/telephony/TelephonyCommon.h"
    1.14 +
    1.15 +#include "nsWrapperCache.h"
    1.16 +
    1.17 +namespace mozilla {
    1.18 +namespace dom {
    1.19 +
    1.20 +class CallsList MOZ_FINAL : public nsISupports,
    1.21 +                            public nsWrapperCache
    1.22 +{
    1.23 +  nsRefPtr<Telephony> mTelephony;
    1.24 +  nsRefPtr<TelephonyCallGroup> mGroup;
    1.25 +
    1.26 +public:
    1.27 +  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
    1.28 +  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CallsList)
    1.29 +
    1.30 +  CallsList(Telephony* aTelephony, TelephonyCallGroup* aGroup = nullptr);
    1.31 +
    1.32 +  nsPIDOMWindow*
    1.33 +  GetParentObject() const;
    1.34 +
    1.35 +  // WrapperCache
    1.36 +  virtual JSObject*
    1.37 +  WrapObject(JSContext* aCx) MOZ_OVERRIDE;
    1.38 +
    1.39 +  // CallsList WebIDL
    1.40 +  already_AddRefed<TelephonyCall>
    1.41 +  Item(uint32_t aIndex) const;
    1.42 +
    1.43 +  uint32_t
    1.44 +  Length() const;
    1.45 +
    1.46 +  already_AddRefed<TelephonyCall>
    1.47 +  IndexedGetter(uint32_t aIndex, bool& aFound) const;
    1.48 +
    1.49 +private:
    1.50 +  ~CallsList();
    1.51 +};
    1.52 +
    1.53 +} // namespace dom
    1.54 +} // namespace mozilla
    1.55 +
    1.56 +#endif // mozilla_dom_telephony_CallsList_h__

mercurial