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