App adapted to replacement of OwnCloudClientMap for interface OwnCloudClientManager...
[pub/Android/ownCloud.git] / src / com / owncloud / android / authentication / OwnCloudAccount.java
1 /* ownCloud Android client application
2 * Copyright (C) 2014 ownCloud Inc.
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 version 2,
6 * as published by the Free Software Foundation.
7 *
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.
12 *
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/>.
15 *
16 */
17
18 package com.owncloud.android.authentication;
19
20 import com.owncloud.android.lib.common.OwnCloudCredentials;
21
22 import android.accounts.Account;
23 import android.content.Context;
24 import android.net.Uri;
25
26 /**
27 * OwnCloud Account
28 *
29 * @author David A. Velasco
30 */
31 public class OwnCloudAccount {
32
33 private Uri mBaseUri;
34
35 private OwnCloudCredentials mCredentials;
36
37 public OwnCloudAccount(Account savedAccount, Context context) {
38
39 }
40
41 public OwnCloudAccount(Uri baseUri, OwnCloudCredentials credentials) {
42 if (baseUri == null) {
43 throw new IllegalArgumentException("Parameter 'baseUri' cannot be null");
44 }
45 mBaseUri = baseUri;
46 mCredentials = credentials;
47 }
48
49 public boolean isAnonymous() {
50 return (mCredentials == null);
51 }
52
53 public Uri getBaseUri() {
54 return mBaseUri;
55 }
56
57 public OwnCloudCredentials getCredentials() {
58 return mCredentials;
59 }
60
61 }