| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> | 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> |
| 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
| 6 | 6 |
| 7 This library is free software; you can redistribute it and/or | 7 This library is free software; you can redistribute it and/or |
| 8 modify it under the terms of the GNU Library General Public | 8 modify it under the terms of the GNU Library General Public |
| 9 License as published by the Free Software Foundation; either | 9 License as published by the Free Software Foundation; either |
| 10 version 2 of the License, or (at your option) any later version. | 10 version 2 of the License, or (at your option) any later version. |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 // Caches the given metadata in association with this resource and suggests | 192 // Caches the given metadata in association with this resource and suggests |
| 193 // that the platform persist it. The dataTypeID is a pseudo-randomly chosen | 193 // that the platform persist it. The dataTypeID is a pseudo-randomly chosen |
| 194 // identifier that is used to distinguish data generated by the caller. | 194 // identifier that is used to distinguish data generated by the caller. |
| 195 void setCachedMetadata(unsigned dataTypeID, const char*, size_t); | 195 void setCachedMetadata(unsigned dataTypeID, const char*, size_t); |
| 196 | 196 |
| 197 // Returns cached metadata of the given type associated with this resource. | 197 // Returns cached metadata of the given type associated with this resource. |
| 198 CachedMetadata* cachedMetadata(unsigned dataTypeID) const; | 198 CachedMetadata* cachedMetadata(unsigned dataTypeID) const; |
| 199 | 199 |
| 200 bool canDelete() const { return !hasClients() && !m_loader && !m_preloadCoun
t && !m_handleCount && !m_protectorCount && !m_resourceToRevalidate && !m_proxyR
esource; } | 200 bool canDelete() const { return !hasClients() && !m_loader && !m_preloadCoun
t && !m_handleCount && !m_protectorCount && !m_resourceToRevalidate && !m_proxyR
esource; } |
| 201 bool hasOneHandle() const { return m_handleCount == 1; } | 201 |
| 202 bool hasOneHandle() const; |
| 202 | 203 |
| 203 // List of acceptable MIME types separated by ",". | 204 // List of acceptable MIME types separated by ",". |
| 204 // A MIME type may contain a wildcard, e.g. "text/*". | 205 // A MIME type may contain a wildcard, e.g. "text/*". |
| 205 AtomicString accept() const { return m_accept; } | 206 AtomicString accept() const { return m_accept; } |
| 206 void setAccept(const AtomicString& accept) { m_accept = accept; } | 207 void setAccept(const AtomicString& accept) { m_accept = accept; } |
| 207 | 208 |
| 208 bool wasCanceled() const { return m_error.isCancellation(); } | 209 bool wasCanceled() const { return m_error.isCancellation(); } |
| 209 bool errorOccurred() const { return m_status == LoadError || m_status == Dec
odeError; } | 210 bool errorOccurred() const { return m_status == LoadError || m_status == Dec
odeError; } |
| 210 bool loadFailedOrCanceled() { return !m_error.isNull(); } | 211 bool loadFailedOrCanceled() { return !m_error.isNull(); } |
| 211 | 212 |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 const char* ResourceTypeName(Resource::Type); | 402 const char* ResourceTypeName(Resource::Type); |
| 402 #endif | 403 #endif |
| 403 | 404 |
| 404 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 405 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
| 405 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() =
= Resource::typeName, resource.type() == Resource::typeName); \ | 406 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() =
= Resource::typeName, resource.type() == Resource::typeName); \ |
| 406 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource
>& ptr) { return to##typeName##Resource(ptr.get()); } | 407 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource
>& ptr) { return to##typeName##Resource(ptr.get()); } |
| 407 | 408 |
| 408 } | 409 } |
| 409 | 410 |
| 410 #endif | 411 #endif |
| OLD | NEW |