12644d947574240b71c427d457f7a775dc160ec09Yorke Lee/*
22644d947574240b71c427d457f7a775dc160ec09Yorke Lee * Copyright (C) 2012 The Android Open Source Project
32644d947574240b71c427d457f7a775dc160ec09Yorke Lee *
42644d947574240b71c427d457f7a775dc160ec09Yorke Lee * Licensed under the Apache License, Version 2.0 (the "License");
52644d947574240b71c427d457f7a775dc160ec09Yorke Lee * you may not use this file except in compliance with the License.
62644d947574240b71c427d457f7a775dc160ec09Yorke Lee * You may obtain a copy of the License at
72644d947574240b71c427d457f7a775dc160ec09Yorke Lee *
82644d947574240b71c427d457f7a775dc160ec09Yorke Lee *      http://www.apache.org/licenses/LICENSE-2.0
92644d947574240b71c427d457f7a775dc160ec09Yorke Lee *
102644d947574240b71c427d457f7a775dc160ec09Yorke Lee * Unless required by applicable law or agreed to in writing, software
112644d947574240b71c427d457f7a775dc160ec09Yorke Lee * distributed under the License is distributed on an "AS IS" BASIS,
122644d947574240b71c427d457f7a775dc160ec09Yorke Lee * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
132644d947574240b71c427d457f7a775dc160ec09Yorke Lee * See the License for the specific language governing permissions and
142644d947574240b71c427d457f7a775dc160ec09Yorke Lee * limitations under the License.
152644d947574240b71c427d457f7a775dc160ec09Yorke Lee */
162644d947574240b71c427d457f7a775dc160ec09Yorke Lee
1769c182afb0e6d82a341a28b4317aa703af768906Gary Maipackage com.android.contacts.model.dataitem;
182644d947574240b71c427d457f7a775dc160ec09Yorke Lee
192644d947574240b71c427d457f7a775dc160ec09Yorke Leeimport android.content.ContentValues;
202644d947574240b71c427d457f7a775dc160ec09Yorke Leeimport android.provider.ContactsContract;
212644d947574240b71c427d457f7a775dc160ec09Yorke Leeimport android.provider.ContactsContract.CommonDataKinds.SipAddress;
222644d947574240b71c427d457f7a775dc160ec09Yorke Lee
232644d947574240b71c427d457f7a775dc160ec09Yorke Lee/**
242644d947574240b71c427d457f7a775dc160ec09Yorke Lee * Represents a sip address data item, wrapping the columns in
252644d947574240b71c427d457f7a775dc160ec09Yorke Lee * {@link ContactsContract.CommonDataKinds.SipAddress}.
262644d947574240b71c427d457f7a775dc160ec09Yorke Lee */
272644d947574240b71c427d457f7a775dc160ec09Yorke Leepublic class SipAddressDataItem extends DataItem {
282644d947574240b71c427d457f7a775dc160ec09Yorke Lee
292644d947574240b71c427d457f7a775dc160ec09Yorke Lee    /* package */ SipAddressDataItem(ContentValues values) {
302644d947574240b71c427d457f7a775dc160ec09Yorke Lee        super(values);
312644d947574240b71c427d457f7a775dc160ec09Yorke Lee    }
322644d947574240b71c427d457f7a775dc160ec09Yorke Lee
332644d947574240b71c427d457f7a775dc160ec09Yorke Lee    public String getSipAddress() {
342644d947574240b71c427d457f7a775dc160ec09Yorke Lee        return getContentValues().getAsString(SipAddress.SIP_ADDRESS);
352644d947574240b71c427d457f7a775dc160ec09Yorke Lee    }
362644d947574240b71c427d457f7a775dc160ec09Yorke Lee
372644d947574240b71c427d457f7a775dc160ec09Yorke Lee    public String getLabel() {
382644d947574240b71c427d457f7a775dc160ec09Yorke Lee        return getContentValues().getAsString(SipAddress.LABEL);
392644d947574240b71c427d457f7a775dc160ec09Yorke Lee    }
402644d947574240b71c427d457f7a775dc160ec09Yorke Lee}
41