1 /* ownCloud Android client application
2 * Copyright (C) 2011 Bartek Przybylski
3 * Copyright (C) 2012-2013 ownCloud Inc.
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2,
7 * as published by the Free Software Foundation.
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.
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/>.
18 package com
.owncloud
.android
.db
;
20 import com
.owncloud
.android
.MainApp
;
22 import android
.net
.Uri
;
23 import android
.provider
.BaseColumns
;
26 * Meta-Class that holds various static field information
28 * @author Bartek Przybylski
31 public class ProviderMeta
{
33 /* These constants are now in MainApp
34 public static final String AUTHORITY_FILES = "org.owncloud";
35 public static final String DB_FILE = "owncloud.db";
37 public static final String DB_NAME
= "filelist";
38 public static final int DB_VERSION
= 4;
40 private ProviderMeta() {
43 static public class ProviderTableMeta
implements BaseColumns
{
44 public static final String DB_NAME
= "filelist";
45 public static final Uri CONTENT_URI
= Uri
.parse("content://"
46 + MainApp
.getAuthority() + "/");
47 public static final Uri CONTENT_URI_FILE
= Uri
.parse("content://"
48 + MainApp
.getAuthority() + "/file");
49 public static final Uri CONTENT_URI_DIR
= Uri
.parse("content://"
50 + MainApp
.getAuthority() + "/dir");
52 public static final String CONTENT_TYPE
= "vnd.android.cursor.dir/vnd.owncloud.file";
53 public static final String CONTENT_TYPE_ITEM
= "vnd.android.cursor.item/vnd.owncloud.file";
55 public static final String FILE_PARENT
= "parent";
56 public static final String FILE_NAME
= "filename";
57 public static final String FILE_CREATION
= "created";
58 public static final String FILE_MODIFIED
= "modified";
59 public static final String FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA
= "modified_at_last_sync_for_data";
60 public static final String FILE_CONTENT_LENGTH
= "content_length";
61 public static final String FILE_CONTENT_TYPE
= "content_type";
62 public static final String FILE_STORAGE_PATH
= "media_path";
63 public static final String FILE_PATH
= "path";
64 public static final String FILE_ACCOUNT_OWNER
= "file_owner";
65 public static final String FILE_LAST_SYNC_DATE
= "last_sync_date"; // _for_properties, but let's keep it as it is
66 public static final String FILE_LAST_SYNC_DATE_FOR_DATA
= "last_sync_date_for_data";
67 public static final String FILE_KEEP_IN_SYNC
= "keep_in_sync";
69 public static final String DEFAULT_SORT_ORDER
= FILE_NAME
70 + " collate nocase asc";