Core library changes to include wifi type. One measly test included as well.
[zxing.git] / core / src / com / google / zxing / client / result / ParsedResultType.java
1 /*
2  * Copyright 2010 ZXing authors
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package com.google.zxing.client.result;
18
19 /**
20  * Represents the type of data encoded by a barcode -- from plain text, to a
21  * URI, to an e-mail address, etc.
22  *
23  * @author Sean Owen
24  */
25 public final class ParsedResultType {
26
27   public static final ParsedResultType ADDRESSBOOK = new ParsedResultType("ADDRESSBOOK");
28   public static final ParsedResultType EMAIL_ADDRESS = new ParsedResultType("EMAIL_ADDRESS");
29   public static final ParsedResultType PRODUCT = new ParsedResultType("PRODUCT");
30   public static final ParsedResultType URI = new ParsedResultType("URI");
31   public static final ParsedResultType TEXT = new ParsedResultType("TEXT");
32   public static final ParsedResultType ANDROID_INTENT = new ParsedResultType("ANDROID_INTENT");
33   public static final ParsedResultType GEO = new ParsedResultType("GEO");
34   public static final ParsedResultType TEL = new ParsedResultType("TEL");
35   public static final ParsedResultType SMS = new ParsedResultType("SMS");
36   public static final ParsedResultType CALENDAR = new ParsedResultType("CALENDAR");
37   public static final ParsedResultType WIFI = new ParsedResultType("WIFI");
38   // "optional" types
39   public static final ParsedResultType NDEF_SMART_POSTER = new ParsedResultType("NDEF_SMART_POSTER");
40   public static final ParsedResultType MOBILETAG_RICH_WEB = new ParsedResultType("MOBILETAG_RICH_WEB");
41   public static final ParsedResultType ISBN = new ParsedResultType("ISBN");
42
43   private final String name;
44
45   private ParsedResultType(String name) {
46     this.name = name;
47   }
48
49   public String toString() {
50     return name;
51   }
52
53 }