2010-06-23 19:46:08 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2015-05-03 19:32:37 +00:00
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* 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/. */
|
2010-06-23 19:46:08 +00:00
|
|
|
|
2016-02-16 21:46:08 +00:00
|
|
|
#ifndef mozilla_dom_indexeddatabase_h__
|
|
|
|
#define mozilla_dom_indexeddatabase_h__
|
2010-06-23 19:46:08 +00:00
|
|
|
|
2013-08-20 06:43:47 +00:00
|
|
|
#include "js/StructuredClone.h"
|
2010-06-23 19:46:08 +00:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsTArray.h"
|
|
|
|
|
2014-09-26 23:21:57 +00:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
2014-10-08 16:15:22 +00:00
|
|
|
|
2015-05-12 12:09:51 +00:00
|
|
|
class Blob;
|
2016-02-16 21:46:08 +00:00
|
|
|
class IDBDatabase;
|
|
|
|
class IDBMutableFile;
|
2014-10-08 16:15:22 +00:00
|
|
|
|
2014-09-26 23:21:57 +00:00
|
|
|
namespace indexedDB {
|
2010-12-10 02:15:00 +00:00
|
|
|
|
2011-12-16 07:34:24 +00:00
|
|
|
class FileInfo;
|
2014-09-26 23:21:57 +00:00
|
|
|
class SerializedStructuredCloneReadInfo;
|
2012-06-03 16:33:52 +00:00
|
|
|
|
2012-08-02 06:02:29 +00:00
|
|
|
struct StructuredCloneFile
|
|
|
|
{
|
2015-10-18 05:24:48 +00:00
|
|
|
RefPtr<Blob> mBlob;
|
|
|
|
RefPtr<IDBMutableFile> mMutableFile;
|
|
|
|
RefPtr<FileInfo> mFileInfo;
|
2015-09-09 11:15:05 +00:00
|
|
|
bool mMutable;
|
2012-06-03 16:33:52 +00:00
|
|
|
|
2014-09-13 16:12:19 +00:00
|
|
|
// In IndexedDatabaseInlines.h
|
2014-09-26 23:21:57 +00:00
|
|
|
inline
|
|
|
|
StructuredCloneFile();
|
2014-09-17 23:36:01 +00:00
|
|
|
|
2014-09-26 23:21:57 +00:00
|
|
|
// In IndexedDatabaseInlines.h
|
|
|
|
inline
|
|
|
|
~StructuredCloneFile();
|
2011-12-16 07:34:24 +00:00
|
|
|
|
2012-06-01 17:21:12 +00:00
|
|
|
// In IndexedDatabaseInlines.h
|
|
|
|
inline bool
|
2014-09-26 23:21:57 +00:00
|
|
|
operator==(const StructuredCloneFile& aOther) const;
|
2014-09-17 23:36:01 +00:00
|
|
|
};
|
2012-06-01 17:21:12 +00:00
|
|
|
|
2014-09-26 23:21:57 +00:00
|
|
|
struct StructuredCloneReadInfo
|
2014-09-17 23:36:01 +00:00
|
|
|
{
|
2016-06-07 08:49:43 +00:00
|
|
|
JSStructuredCloneData mData;
|
2014-09-26 23:21:57 +00:00
|
|
|
nsTArray<StructuredCloneFile> mFiles;
|
|
|
|
IDBDatabase* mDatabase;
|
2012-06-01 17:21:12 +00:00
|
|
|
|
|
|
|
// In IndexedDatabaseInlines.h
|
2014-09-26 23:21:57 +00:00
|
|
|
inline
|
|
|
|
StructuredCloneReadInfo();
|
2012-06-01 17:21:12 +00:00
|
|
|
|
2014-09-13 16:12:19 +00:00
|
|
|
// In IndexedDatabaseInlines.h
|
2014-09-26 23:21:57 +00:00
|
|
|
inline
|
|
|
|
~StructuredCloneReadInfo();
|
2011-12-16 07:34:24 +00:00
|
|
|
|
2016-08-10 06:18:29 +00:00
|
|
|
// In IndexedDatabaseInlines.h
|
|
|
|
inline
|
|
|
|
StructuredCloneReadInfo(StructuredCloneReadInfo&& aOther);
|
|
|
|
|
2014-09-26 23:21:57 +00:00
|
|
|
// In IndexedDatabaseInlines.h
|
|
|
|
inline StructuredCloneReadInfo&
|
|
|
|
operator=(StructuredCloneReadInfo&& aOther);
|
2014-09-17 23:36:01 +00:00
|
|
|
|
2014-09-26 23:21:57 +00:00
|
|
|
// In IndexedDatabaseInlines.h
|
|
|
|
inline
|
|
|
|
MOZ_IMPLICIT StructuredCloneReadInfo(SerializedStructuredCloneReadInfo&& aOther);
|
2012-06-01 17:21:12 +00:00
|
|
|
};
|
2010-12-10 02:15:00 +00:00
|
|
|
|
2014-09-26 23:21:57 +00:00
|
|
|
} // namespace indexedDB
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2010-12-10 02:15:00 +00:00
|
|
|
|
2016-02-16 21:46:08 +00:00
|
|
|
#endif // mozilla_dom_indexeddatabase_h__
|