PageRenderTime 16ms CodeModel.GetById 10ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/core/externals/google-toolbox-for-mac/Foundation/GTMURITemplate.h

http://macfuse.googlecode.com/
C++ Header | 44 lines | 6 code | 7 blank | 31 comment | 0 complexity | 7d9781fec4170a3f9b66b284411ec5e5 MD5 | raw file
 1/* Copyright (c) 2010 Google Inc.
 2 *
 3 * Licensed under the Apache License, Version 2.0 (the "License");
 4 * you may not use this file except in compliance with the License.
 5 * You may obtain a copy of the License at
 6 *
 7 *     http://www.apache.org/licenses/LICENSE-2.0
 8 *
 9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#import <Foundation/Foundation.h>
17
18#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
19
20//
21// URI Template
22//
23// http://tools.ietf.org/html/draft-gregorio-uritemplate-04
24//
25// NOTE: This implemention is only a subset of the spec.  It should be able
26// to parse any template that matches the spec, but if the template makes use
27// of a feature that is not supported, it will fail with an error.
28//
29
30@interface GTMURITemplate : NSObject
31
32// Process the template.  If the template uses an unsupported feature, it will
33// throw an exception to help catch that limitation.  Currently unsupported
34// feature is partial result modifiers (prefix/suffix).
35//
36// valueProvider should be anything that implements -objectForKey:.  At the
37// simplest level, this can be an NSDictionary.  However, a custom class that
38// implements valueForKey may be better for some uses (like if the values
39// are coming out of some other structure).
40+ (NSString *)expandTemplate:(NSString *)uriTemplate values:(id)valueProvider;
41
42@end
43
44#endif  // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5