|
1 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
4 |
|
5 #ifndef CacheFileUtils__h__ |
|
6 #define CacheFileUtils__h__ |
|
7 |
|
8 #include "nsError.h" |
|
9 #include "nsCOMPtr.h" |
|
10 #include "nsString.h" |
|
11 |
|
12 class nsILoadContextInfo; |
|
13 class nsACString; |
|
14 |
|
15 namespace mozilla { |
|
16 namespace net { |
|
17 namespace CacheFileUtils { |
|
18 |
|
19 already_AddRefed<nsILoadContextInfo> |
|
20 ParseKey(const nsCSubstring &aKey, |
|
21 nsCSubstring *aIdEnhance = nullptr, |
|
22 nsCSubstring *aURISpec = nullptr); |
|
23 |
|
24 void |
|
25 AppendKeyPrefix(nsILoadContextInfo *aInfo, nsACString &_retval); |
|
26 |
|
27 void |
|
28 AppendTagWithValue(nsACString & aTarget, char const aTag, nsCSubstring const & aValue); |
|
29 |
|
30 nsresult |
|
31 KeyMatchesLoadContextInfo(const nsACString &aKey, |
|
32 nsILoadContextInfo *aInfo, |
|
33 bool *_retval); |
|
34 |
|
35 } // CacheFileUtils |
|
36 } // net |
|
37 } // mozilla |
|
38 |
|
39 #endif |