Merge tag 'oc-android-1-3-22' into oauth_login
[pub/Android/ownCloud.git] / src / com / owncloud / android / db / ProviderMeta.java
1 /* ownCloud Android client application
2 * Copyright (C) 2011 Bartek Przybylski
3 * Copyright (C) 2012-2013 ownCloud Inc.
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 */
19 package com.owncloud.android.db;
20
21 import android.net.Uri;
22 import android.provider.BaseColumns;
23
24 /**
25 * Meta-Class that holds various static field information
26 *
27 * @author Bartek Przybylski
28 *
29 */
30 public class ProviderMeta {
31
32 public static final String AUTHORITY_FILES = "org.owncloud";
33 public static final String DB_FILE = "owncloud.db";
34 public static final String DB_NAME = "filelist";
35 public static final int DB_VERSION = 4;
36
37 private ProviderMeta() {
38 }
39
40 static public class ProviderTableMeta implements BaseColumns {
41 public static final String DB_NAME = "filelist";
42 public static final Uri CONTENT_URI = Uri.parse("content://"
43 + AUTHORITY_FILES + "/");
44 public static final Uri CONTENT_URI_FILE = Uri.parse("content://"
45 + AUTHORITY_FILES + "/file");
46 public static final Uri CONTENT_URI_DIR = Uri.parse("content://"
47 + AUTHORITY_FILES + "/dir");
48
49 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.owncloud.file";
50 public static final String CONTENT_TYPE_ITEM = "vnd.android.cursor.item/vnd.owncloud.file";
51
52 public static final String FILE_PARENT = "parent";
53 public static final String FILE_NAME = "filename";
54 public static final String FILE_CREATION = "created";
55 public static final String FILE_MODIFIED = "modified";
56 public static final String FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA = "modified_at_last_sync_for_data";
57 public static final String FILE_CONTENT_LENGTH = "content_length";
58 public static final String FILE_CONTENT_TYPE = "content_type";
59 public static final String FILE_STORAGE_PATH = "media_path";
60 public static final String FILE_PATH = "path";
61 public static final String FILE_ACCOUNT_OWNER = "file_owner";
62 public static final String FILE_LAST_SYNC_DATE = "last_sync_date"; // _for_properties, but let's keep it as it is
63 public static final String FILE_LAST_SYNC_DATE_FOR_DATA = "last_sync_date_for_data";
64 public static final String FILE_KEEP_IN_SYNC = "keep_in_sync";
65
66 public static final String DEFAULT_SORT_ORDER = FILE_NAME
67 + " collate nocase asc";
68
69 }
70 }