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 Apple Inc. All rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 | 175 |
176 // Caches the given metadata in association with this resource and suggests | 176 // Caches the given metadata in association with this resource and suggests |
177 // that the platform persist it. The dataTypeID is a pseudo-randomly chosen | 177 // that the platform persist it. The dataTypeID is a pseudo-randomly chosen |
178 // identifier that is used to distinguish data generated by the caller. | 178 // identifier that is used to distinguish data generated by the caller. |
179 void setCachedMetadata(unsigned dataTypeID, const char*, size_t); | 179 void setCachedMetadata(unsigned dataTypeID, const char*, size_t); |
180 | 180 |
181 // Returns cached metadata of the given type associated with this resource. | 181 // Returns cached metadata of the given type associated with this resource. |
182 CachedMetadata* cachedMetadata(unsigned dataTypeID) const; | 182 CachedMetadata* cachedMetadata(unsigned dataTypeID) const; |
183 | 183 |
184 bool canDelete() const { return !hasClients() && !m_request && !m_preloadCou
nt && !m_handleCount && !m_resourceToRevalidate && !m_proxyResource; } | 184 bool canDelete() const { return !hasClients() && !m_request && !m_preloadCou
nt && !m_handleCount && !m_resourceToRevalidate && !m_proxyResource; } |
| 185 bool hasOneHandle() const { return m_handleCount == 1; } |
185 | 186 |
186 bool isExpired() const; | 187 bool isExpired() const; |
187 | 188 |
188 // List of acceptable MIME types separated by ",". | 189 // List of acceptable MIME types separated by ",". |
189 // A MIME type may contain a wildcard, e.g. "text/*". | 190 // A MIME type may contain a wildcard, e.g. "text/*". |
190 String accept() const { return m_accept; } | 191 String accept() const { return m_accept; } |
191 void setAccept(const String& accept) { m_accept = accept; } | 192 void setAccept(const String& accept) { m_accept = accept; } |
192 | 193 |
193 bool wasCanceled() const { return m_status == Canceled; } | 194 bool wasCanceled() const { return m_status == Canceled; } |
194 bool errorOccurred() const { return (m_status == LoadError || m_status == De
codeError); } | 195 bool errorOccurred() const { return (m_status == LoadError || m_status == De
codeError); } |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 // If this field is non-null, the resource has a proxy for checking whether
it is still up to date (see m_resourceToRevalidate). | 300 // If this field is non-null, the resource has a proxy for checking whether
it is still up to date (see m_resourceToRevalidate). |
300 CachedResource* m_proxyResource; | 301 CachedResource* m_proxyResource; |
301 | 302 |
302 // These handles will need to be updated to point to the m_resourceToRevalid
ate in case we get 304 response. | 303 // These handles will need to be updated to point to the m_resourceToRevalid
ate in case we get 304 response. |
303 HashSet<CachedResourceHandleBase*> m_handlesToRevalidate; | 304 HashSet<CachedResourceHandleBase*> m_handlesToRevalidate; |
304 }; | 305 }; |
305 | 306 |
306 } | 307 } |
307 | 308 |
308 #endif | 309 #endif |
OLD | NEW |