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