2013-11-13 12:51:23 +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_network_MobileConnectionArray_h__
|
|
|
|
#define mozilla_dom_network_MobileConnectionArray_h__
|
|
|
|
|
2014-09-21 11:24:42 +04:00
|
|
|
#include "mozilla/dom/MobileConnection.h"
|
2013-11-13 12:51:23 +04:00
|
|
|
#include "nsWrapperCache.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2014-05-05 10:36:20 +04:00
|
|
|
class MobileConnectionArray MOZ_FINAL : public nsISupports
|
|
|
|
, public nsWrapperCache
|
2013-11-13 12:51:23 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MobileConnectionArray)
|
|
|
|
|
2014-09-05 07:22:49 +04:00
|
|
|
explicit MobileConnectionArray(nsPIDOMWindow* aWindow);
|
2013-11-13 12:51:23 +04:00
|
|
|
|
|
|
|
nsPIDOMWindow*
|
|
|
|
GetParentObject() const;
|
|
|
|
|
|
|
|
// WrapperCache
|
|
|
|
virtual JSObject*
|
2014-04-09 02:27:18 +04:00
|
|
|
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
2013-11-13 12:51:23 +04:00
|
|
|
|
|
|
|
// WebIDL
|
2014-05-05 10:36:20 +04:00
|
|
|
MobileConnection*
|
2014-01-14 10:17:35 +04:00
|
|
|
Item(uint32_t aIndex);
|
2013-11-13 12:51:23 +04:00
|
|
|
|
|
|
|
uint32_t
|
2014-09-21 11:24:43 +04:00
|
|
|
Length();
|
2013-11-13 12:51:23 +04:00
|
|
|
|
2014-05-05 10:36:20 +04:00
|
|
|
MobileConnection*
|
2014-01-14 10:17:35 +04:00
|
|
|
IndexedGetter(uint32_t aIndex, bool& aFound);
|
2013-11-13 12:51:23 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
~MobileConnectionArray();
|
|
|
|
|
2014-09-21 11:24:43 +04:00
|
|
|
bool mLengthInitialized;
|
2013-12-09 05:59:17 +04:00
|
|
|
|
2013-11-13 12:51:23 +04:00
|
|
|
nsCOMPtr<nsPIDOMWindow> mWindow;
|
|
|
|
nsTArray<nsRefPtr<MobileConnection>> mMobileConnections;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2013-12-09 05:59:17 +04:00
|
|
|
#endif // mozilla_dom_network_MobileConnectionArray_h__
|