Loading src/com/owncloud/android/lib/common/network/WebdavEntry.java +19 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ public class WebdavEntry { public static final String EXTENDED_PROPERTY_OWNER_ID = "owner-id"; public static final String EXTENDED_PROPERTY_OWNER_DISPLAY_NAME = "owner-display-name"; public static final String EXTENDED_PROPERTY_UNREAD_COMMENTS = "comments-unread"; public static final String EXTENDED_PROPERTY_HAS_PREVIEW = "has-preview"; public static final String TRASHBIN_FILENAME = "trashbin-filename"; public static final String TRASHBIN_ORIGINAL_LOCATION = "trashbin-original-location"; public static final String TRASHBIN_DELETION_TIME = "trashbin-deletion-time"; Loading Loading @@ -85,6 +86,7 @@ public class WebdavEntry { private String ownerId; private String ownerDisplayName; private int unreadCommentsCount; private boolean hasPreview; public enum MountType {INTERNAL, EXTERNAL} Loading Loading @@ -272,6 +274,14 @@ public class WebdavEntry { unreadCommentsCount = 0; } // NC has preview property <nc-has-preview> prop = propSet.get(EXTENDED_PROPERTY_HAS_PREVIEW, ncNamespace); if (prop != null) { hasPreview = Boolean.valueOf(prop.getValue().toString()); } else { hasPreview = true; } // NC trashbin-original-location <nc:trashbin-original-location> prop = propSet.get(TRASHBIN_ORIGINAL_LOCATION, ncNamespace); if (prop != null) { Loading Loading @@ -398,6 +408,14 @@ public class WebdavEntry { return unreadCommentsCount; } public boolean hasPreview() { return hasPreview; } public void setHasPreview(boolean hasPreview) { this.hasPreview = hasPreview; } private void resetData() { name = uri = contentType = permissions = null; remoteId = null; Loading @@ -406,5 +424,6 @@ public class WebdavEntry { quotaUsedBytes = null; quotaAvailableBytes = null; favorite = false; hasPreview = false; } } src/com/owncloud/android/lib/common/network/WebdavUtils.java +2 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ public class WebdavUtils { propSet.add(WebdavEntry.EXTENDED_PROPERTY_OWNER_ID, ocNamespace); propSet.add(WebdavEntry.EXTENDED_PROPERTY_OWNER_DISPLAY_NAME, ocNamespace); propSet.add(WebdavEntry.EXTENDED_PROPERTY_UNREAD_COMMENTS, ocNamespace); propSet.add(WebdavEntry.EXTENDED_PROPERTY_HAS_PREVIEW, ncNamespace); return propSet; } Loading @@ -131,6 +132,7 @@ public class WebdavUtils { propSet.add(WebdavEntry.EXTENDED_PROPERTY_NAME_REMOTE_ID, Namespace.getNamespace(WebdavEntry.NAMESPACE_OC)); propSet.add(WebdavEntry.EXTENDED_PROPERTY_NAME_SIZE, Namespace.getNamespace(WebdavEntry.NAMESPACE_OC)); propSet.add(WebdavEntry.EXTENDED_PROPERTY_FAVORITE, Namespace.getNamespace(WebdavEntry.NAMESPACE_OC)); propSet.add(WebdavEntry.EXTENDED_PROPERTY_HAS_PREVIEW, Namespace.getNamespace(WebdavEntry.NAMESPACE_NC)); return propSet; } Loading src/com/owncloud/android/lib/common/utils/WebDavFileUtils.java +1 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ public class WebDavFileUtils { file.setRemoteId(we.remoteId()); file.setSize(we.size()); file.setFavorite(we.isFavorite()); file.setHasPreview(we.hasPreview()); return file; } } src/com/owncloud/android/lib/resources/files/ReadRemoteFolderOperation.java +1 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,7 @@ public class ReadRemoteFolderOperation extends RemoteOperation { file.setOwnerId(we.getOwnerId()); file.setOwnerDisplayName(we.getOwnerDisplayName()); file.setUnreadCommentsCount(we.getUnreadCommentsCount()); file.setHasPreview(we.hasPreview()); return file; } Loading src/com/owncloud/android/lib/resources/files/RemoteFile.java +11 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ public class RemoteFile implements Parcelable, Serializable { private String ownerId; private String ownerDisplayName; private int unreadCommentsCount; private boolean hasPreview; /** * Getters and Setters. Loading Loading @@ -183,6 +184,14 @@ public class RemoteFile implements Parcelable, Serializable { return unreadCommentsCount; } public boolean hasPreview() { return hasPreview; } public void setHasPreview(boolean hasPreview) { this.hasPreview = hasPreview; } public RemoteFile() { resetData(); } Loading Loading @@ -278,6 +287,7 @@ public class RemoteFile implements Parcelable, Serializable { mMountType = (WebdavEntry.MountType) source.readSerializable(); ownerId = source.readString(); ownerDisplayName = source.readString(); hasPreview = Boolean.parseBoolean(source.readString()); } @Override Loading @@ -301,5 +311,6 @@ public class RemoteFile implements Parcelable, Serializable { dest.writeSerializable(mMountType); dest.writeString(ownerId); dest.writeString(ownerDisplayName); dest.writeString(Boolean.toString(hasPreview)); } } Loading
src/com/owncloud/android/lib/common/network/WebdavEntry.java +19 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ public class WebdavEntry { public static final String EXTENDED_PROPERTY_OWNER_ID = "owner-id"; public static final String EXTENDED_PROPERTY_OWNER_DISPLAY_NAME = "owner-display-name"; public static final String EXTENDED_PROPERTY_UNREAD_COMMENTS = "comments-unread"; public static final String EXTENDED_PROPERTY_HAS_PREVIEW = "has-preview"; public static final String TRASHBIN_FILENAME = "trashbin-filename"; public static final String TRASHBIN_ORIGINAL_LOCATION = "trashbin-original-location"; public static final String TRASHBIN_DELETION_TIME = "trashbin-deletion-time"; Loading Loading @@ -85,6 +86,7 @@ public class WebdavEntry { private String ownerId; private String ownerDisplayName; private int unreadCommentsCount; private boolean hasPreview; public enum MountType {INTERNAL, EXTERNAL} Loading Loading @@ -272,6 +274,14 @@ public class WebdavEntry { unreadCommentsCount = 0; } // NC has preview property <nc-has-preview> prop = propSet.get(EXTENDED_PROPERTY_HAS_PREVIEW, ncNamespace); if (prop != null) { hasPreview = Boolean.valueOf(prop.getValue().toString()); } else { hasPreview = true; } // NC trashbin-original-location <nc:trashbin-original-location> prop = propSet.get(TRASHBIN_ORIGINAL_LOCATION, ncNamespace); if (prop != null) { Loading Loading @@ -398,6 +408,14 @@ public class WebdavEntry { return unreadCommentsCount; } public boolean hasPreview() { return hasPreview; } public void setHasPreview(boolean hasPreview) { this.hasPreview = hasPreview; } private void resetData() { name = uri = contentType = permissions = null; remoteId = null; Loading @@ -406,5 +424,6 @@ public class WebdavEntry { quotaUsedBytes = null; quotaAvailableBytes = null; favorite = false; hasPreview = false; } }
src/com/owncloud/android/lib/common/network/WebdavUtils.java +2 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ public class WebdavUtils { propSet.add(WebdavEntry.EXTENDED_PROPERTY_OWNER_ID, ocNamespace); propSet.add(WebdavEntry.EXTENDED_PROPERTY_OWNER_DISPLAY_NAME, ocNamespace); propSet.add(WebdavEntry.EXTENDED_PROPERTY_UNREAD_COMMENTS, ocNamespace); propSet.add(WebdavEntry.EXTENDED_PROPERTY_HAS_PREVIEW, ncNamespace); return propSet; } Loading @@ -131,6 +132,7 @@ public class WebdavUtils { propSet.add(WebdavEntry.EXTENDED_PROPERTY_NAME_REMOTE_ID, Namespace.getNamespace(WebdavEntry.NAMESPACE_OC)); propSet.add(WebdavEntry.EXTENDED_PROPERTY_NAME_SIZE, Namespace.getNamespace(WebdavEntry.NAMESPACE_OC)); propSet.add(WebdavEntry.EXTENDED_PROPERTY_FAVORITE, Namespace.getNamespace(WebdavEntry.NAMESPACE_OC)); propSet.add(WebdavEntry.EXTENDED_PROPERTY_HAS_PREVIEW, Namespace.getNamespace(WebdavEntry.NAMESPACE_NC)); return propSet; } Loading
src/com/owncloud/android/lib/common/utils/WebDavFileUtils.java +1 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ public class WebDavFileUtils { file.setRemoteId(we.remoteId()); file.setSize(we.size()); file.setFavorite(we.isFavorite()); file.setHasPreview(we.hasPreview()); return file; } }
src/com/owncloud/android/lib/resources/files/ReadRemoteFolderOperation.java +1 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,7 @@ public class ReadRemoteFolderOperation extends RemoteOperation { file.setOwnerId(we.getOwnerId()); file.setOwnerDisplayName(we.getOwnerDisplayName()); file.setUnreadCommentsCount(we.getUnreadCommentsCount()); file.setHasPreview(we.hasPreview()); return file; } Loading
src/com/owncloud/android/lib/resources/files/RemoteFile.java +11 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ public class RemoteFile implements Parcelable, Serializable { private String ownerId; private String ownerDisplayName; private int unreadCommentsCount; private boolean hasPreview; /** * Getters and Setters. Loading Loading @@ -183,6 +184,14 @@ public class RemoteFile implements Parcelable, Serializable { return unreadCommentsCount; } public boolean hasPreview() { return hasPreview; } public void setHasPreview(boolean hasPreview) { this.hasPreview = hasPreview; } public RemoteFile() { resetData(); } Loading Loading @@ -278,6 +287,7 @@ public class RemoteFile implements Parcelable, Serializable { mMountType = (WebdavEntry.MountType) source.readSerializable(); ownerId = source.readString(); ownerDisplayName = source.readString(); hasPreview = Boolean.parseBoolean(source.readString()); } @Override Loading @@ -301,5 +311,6 @@ public class RemoteFile implements Parcelable, Serializable { dest.writeSerializable(mMountType); dest.writeString(ownerId); dest.writeString(ownerDisplayName); dest.writeString(Boolean.toString(hasPreview)); } }