More fixes to the build files after trying to build the whole thing again for release
[zxing.git] / iphone / Classes / BookmarkDoCoMoResultParser.m
1 //
2 //  BookmarkDoCoMoResultParser.m
3 //  ZXing
4 //
5 //  Created by Christian Brunschen on 25/06/2008.
6 //  Copyright 2008 Google Inc. All rights reserved.
7 //
8
9 #import "BookmarkDoCoMoResultParser.h"
10 #import "URIParsedResult.h"
11
12 @implementation BookmarkDoCoMoResultParser
13
14 + (ParsedResult *)parsedResultForString:(NSString *)s {
15   NSRange foundRange = [s rangeOfString:@"MEBKM:"];
16   if (foundRange.location == NSNotFound) {
17     return nil;
18   }
19   
20   NSString *urlString = [s fieldWithPrefix:@"URL:"];
21   if (urlString == nil) {
22     return nil;
23   }
24   
25   NSString *title = [s fieldWithPrefix:@"TITLE:"];
26   
27   return [[[URIParsedResult alloc] initWithURLString:urlString 
28                                                title:title] autorelease];
29 }
30
31
32 @end