Index: loader/appcache2/ApplicationCacheCommon.h |
=================================================================== |
--- loader/appcache2/ApplicationCacheCommon.h (revision 0) |
+++ loader/appcache2/ApplicationCacheCommon.h (revision 0) |
@@ -0,0 +1,111 @@ |
+/* |
+ * Copyright (c) 2009, Google Inc. All rights reserved. |
+ * |
+ * Redistribution and use in source and binary forms, with or without |
+ * modification, are permitted provided that the following conditions are |
+ * met: |
+ * |
+ * * Redistributions of source code must retain the above copyright |
+ * notice, this list of conditions and the following disclaimer. |
+ * * Redistributions in binary form must reproduce the above |
+ * copyright notice, this list of conditions and the following disclaimer |
+ * in the documentation and/or other materials provided with the |
+ * distribution. |
+ * * Neither the name of Google Inc. nor the names of its |
+ * contributors may be used to endorse or promote products derived from |
+ * this software without specific prior written permission. |
+ * |
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+ */ |
+ |
+#ifndef ApplicationCacheCommon_h |
+#define ApplicationCacheCommon_h |
+ |
+#if ENABLE(APPLICATION_CACHE) |
+ |
+namespace WebCore { |
+ |
+ // Types and constants used by the front and back ends |
+ |
+ typedef long long ApplicationCacheStorageID; // a 64 bit sqlite rowid |
+ typedef ApplicationCacheStorageID ApplicationCacheID; |
+ typedef int ApplicationCacheContextID; |
+ |
+ struct GlobalApplicationCacheContextID { |
+ GlobalApplicationCacheContextID() |
+ : m_contextID(0) |
+ , m_processID(0) |
+ { |
+ } |
+ |
+ GlobalApplicationCacheContextID(ApplicationCacheContextID contextID, int processID) |
+ : m_contextID(contextID) |
+ , m_processID(processID) |
+ { |
+ } |
+ |
+ ApplicationCacheContextID m_contextID; |
+ int m_processID; |
+ |
+ bool operator==(const GlobalApplicationCacheContextID& other) const |
+ { |
+ return (m_contextID == other.m_contextID) && (m_processID == other.m_processID); |
+ } |
+ |
+ bool operator!=(const GlobalApplicationCacheContextID& other) const |
+ { |
+ return !(*this == other); |
+ } |
+ |
+ static GlobalApplicationCacheContextID none() { return GlobalApplicationCacheContextID(); } |
+ }; |
+ |
+ enum ApplicationCacheContextType { |
+ MainFrameContext, |
+ SubFrameContext, |
+ DedicatedWorkerContext, |
+ SharedWorkerContext |
+ }; |
+ |
+ enum WellKnownApplicationCacheIDs { |
+ NoApplicationCacheID = 0, |
+ NoApplicationCacheContextID = 0, |
+ UnknownApplicationCacheContextID = -1, |
+ }; |
+ |
+ // These status values correspond with those specified by this HTML5 spec. |
+ enum ApplicationCacheStatus { |
+ APPCACHE_UNCACHED = 0, |
+ APPCACHE_IDLE = 1, |
+ APPCACHE_CHECKING = 2, |
+ APPCACHE_DOWNLOADING = 3, |
+ APPCACHE_UPDATEREADY = 4, |
+ APPCACHE_OBSOLETE = 5 |
+ }; |
+ |
+ enum ApplicationCacheEventType { |
+ APPCACHE_CHECKING_EVENT, |
+ APPCACHE_ERROR_EVENT, |
+ APPCACHE_NOUPDATE_EVENT, |
+ APPCACHE_DOWNLOADING_EVENT, |
+ APPCACHE_PROGRESS_EVENT, |
+ APPCACHE_UPDATEREADY_EVENT, |
+ APPCACHE_CACHED_EVENT, |
+ APPCACHE_OBSOLETE_EVENT, |
+ NUMBER_OF_APPCACHE_EVENT_TYPES, |
+ }; |
+ |
+} // namespace WebCore |
+ |
+#endif // ENABLE(APPLICATION_CACHE) |
+#endif // ApplicationCacheCommon_h |
Property changes on: loader\appcache2\ApplicationCacheCommon.h |
___________________________________________________________________ |
Added: svn:eol-style |
+ LF |