1 /* ownCloud Android client application
2 * Copyright (C) 2014 ownCloud Inc.
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2,
6 * as published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 package com
.owncloud
.android
.authentication
;
20 import com
.owncloud
.android
.lib
.common
.OwnCloudCredentials
;
22 import android
.accounts
.Account
;
23 import android
.content
.Context
;
24 import android
.net
.Uri
;
29 * @author David A. Velasco
31 public class OwnCloudAccount
{
35 private OwnCloudCredentials mCredentials
;
37 public OwnCloudAccount(Account savedAccount
, Context context
) {
41 public OwnCloudAccount(Uri baseUri
, OwnCloudCredentials credentials
) {
42 if (baseUri
== null
) {
43 throw new IllegalArgumentException("Parameter 'baseUri' cannot be null");
46 mCredentials
= credentials
;
49 public boolean isAnonymous() {
50 return (mCredentials
== null
);
53 public Uri
getBaseUri() {
57 public OwnCloudCredentials
getCredentials() {