BookmarksLoader.java revision 8402962ef58546d3cfd48fbb211b5e36df0f118e
1/*
2 * Copyright (C) 2010 The Android Open Source Project
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
17package com.android.browser;
18
19import com.android.browser.provider.BrowserContract.Bookmarks;
20
21import android.content.Context;
22import android.content.CursorLoader;
23
24public class BookmarksLoader extends CursorLoader {
25    public static final String ARG_ROOT_FOLDER = "root";
26
27    public static final int COLUMN_INDEX_ID = 0;
28    public static final int COLUMN_INDEX_URL = 1;
29    public static final int COLUMN_INDEX_TITLE = 2;
30    public static final int COLUMN_INDEX_FAVICON = 3;
31    public static final int COLUMN_INDEX_THUMBNAIL = 4;
32    public static final int COLUMN_INDEX_TOUCH_ICON = 5;
33    public static final int COLUMN_INDEX_IS_FOLDER = 6;
34
35    public static final String[] PROJECTION = new String[] {
36        Bookmarks._ID, // 0
37        Bookmarks.URL, // 1
38        Bookmarks.TITLE, // 2
39        Bookmarks.FAVICON, // 3
40        Bookmarks.THUMBNAIL, // 4
41        Bookmarks.TOUCH_ICON, // 5
42        Bookmarks.IS_FOLDER, // 6
43        Bookmarks.POSITION, // 7
44    };
45
46    public BookmarksLoader(Context context, int rootFolder) {
47        super(context, Bookmarks.CONTENT_URI_DEFAULT_FOLDER, PROJECTION, null, null, null);
48    }
49}
50