summaryrefslogtreecommitdiff
path: root/src/com/google/wireless/gdata/contacts/data/ImAddress.java
blob: 291b4fab9223cff2a58147f675c818cec524f2eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright 2007 The Android Open Source Project

package com.google.wireless.gdata.contacts.data;

/**
 * The ImAddress gdata type
 */
public class ImAddress extends ContactsElement {
  public static final byte TYPE_HOME = 1;
  public static final byte TYPE_WORK = 2;
  public static final byte TYPE_OTHER = 3;

  public static final byte PROTOCOL_CUSTOM = 1;
  public static final byte PROTOCOL_AIM = 2;
  public static final byte PROTOCOL_MSN = 3;
  public static final byte PROTOCOL_YAHOO = 4;
  public static final byte PROTOCOL_SKYPE = 5;
  public static final byte PROTOCOL_QQ = 6;
  public static final byte PROTOCOL_GOOGLE_TALK = 7;
  public static final byte PROTOCOL_ICQ = 8;
  public static final byte PROTOCOL_JABBER = 9;
  public static final byte PROTOCOL_NONE = 10;

  private byte protocolPredefined;
  private String protocolCustom;
  private String address;

  public byte getProtocolPredefined() {
    return protocolPredefined;
  }

  public void setProtocolPredefined(byte protocolPredefined) {
    this.protocolPredefined = protocolPredefined;
  }

  public String getProtocolCustom() {
    return protocolCustom;
  }

  public void setProtocolCustom(String protocolCustom) {
    this.protocolCustom = protocolCustom;
  }

  public String getAddress() {
    return address;
  }

  public void setAddress(String address) {
    this.address = address;
  }

  public void toString(StringBuffer sb) {
    sb.append("ImAddress");
    super.toString(sb);
    sb.append(" protocolPredefined:").append(protocolPredefined);
    if (protocolCustom != null) sb.append(" protocolCustom:").append(protocolCustom);
    if (address != null) sb.append(" address:").append(address);
  }
}