1 /* Copyright (C) 2010 The Android Open Source Project. 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 package com.android.exchange.provider; 17 18 import java.util.ArrayList; 19 20 /** 21 * A container for GAL results from EAS 22 * Each element of the galData array becomes an element of the list used by autocomplete 23 */ 24 public class GalResult { 25 // Total number of matches in this result 26 public int total; 27 public ArrayList<GalData> galData = new ArrayList<GalData>(); 28 29 public GalResult() { 30 } 31 32 public void addGalData(long id, String displayName, String emailAddress) { 33 galData.add(new GalData(id, displayName, emailAddress)); 34 } 35 36 public static class GalData { 37 final long _id; 38 final String displayName; 39 final String emailAddress; 40 41 private GalData(long id, String _displayName, String _emailAddress) { 42 _id = id; 43 displayName = _displayName; 44 emailAddress = _emailAddress; 45 } 46 } 47 } 48