src/org/gege/caldavsyncadapter/authenticator/Authenticator.java

Tue, 10 Feb 2015 18:12:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 10 Feb 2015 18:12:00 +0100
changeset 0
fb9019fb1bf7
permissions
-rw-r--r--

Import initial revisions of existing project AndroidCaldavSyncAdapater,
forked from upstream repository at 27e8a0f8495c92e0780d450bdf0c7cec77a03a55.

     1 /**
     2  * Copyright (c) 2012-2013, Gerald Garcia
     3  * 
     4  * This file is part of Andoid Caldav Sync Adapter Free.
     5  *
     6  * Andoid Caldav Sync Adapter Free is free software: you can redistribute 
     7  * it and/or modify it under the terms of the GNU General Public License 
     8  * as published by the Free Software Foundation, either version 3 of the 
     9  * License, or at your option any later version.
    10  *
    11  * Andoid Caldav Sync Adapter Free is distributed in the hope that 
    12  * it will be useful, but WITHOUT ANY WARRANTY; without even the implied 
    13  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14  * GNU General Public License for more details.
    15  *
    16  * You should have received a copy of the GNU General Public License
    17  * along with Andoid Caldav Sync Adapter Free.  
    18  * If not, see <http://www.gnu.org/licenses/>.
    19  * 
    20  */
    22 package org.gege.caldavsyncadapter.authenticator;
    26 import android.accounts.AbstractAccountAuthenticator;
    27 import android.accounts.Account;
    28 import android.accounts.AccountAuthenticatorResponse;
    29 import android.accounts.AccountManager;
    30 import android.accounts.NetworkErrorException;
    31 import android.content.Context;
    32 import android.content.Intent;
    33 import android.os.Bundle;
    34 import android.util.Log;
    36 public class Authenticator  extends AbstractAccountAuthenticator {
    38 	private static final String TAG = "Authenticator";
    39 	private Context mContext;
    41 	public Authenticator(Context context) {
    42 		super(context);
    44 		mContext = context;
    45 	}
    47 	@Override
    48 	public Bundle addAccount(AccountAuthenticatorResponse response,
    49 			String accountType, String authTokenType,
    50 			String[] requiredFeatures, Bundle options)
    51 			throws NetworkErrorException {
    54 		Log.v(TAG, "addAccount()");
    56         final Intent intent = new Intent(mContext, AuthenticatorActivity.class);
    57         intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
    58         final Bundle bundle = new Bundle();
    59         bundle.putParcelable(AccountManager.KEY_INTENT, intent);
    60         return bundle;
    62 	}
    64 	@Override
    65 	public Bundle confirmCredentials(AccountAuthenticatorResponse response,
    66 			Account account, Bundle options) throws NetworkErrorException {
    67 		// TODO Auto-generated method stub
    68 		return null;
    69 	}
    71 	@Override
    72 	public Bundle editProperties(AccountAuthenticatorResponse response,
    73 			String accountType) {
    74 		// TODO Auto-generated method stub
    75 		return null;
    76 	}
    78 	@Override
    79 	public Bundle getAuthToken(AccountAuthenticatorResponse response,
    80 			Account account, String authTokenType, Bundle options)
    81 			throws NetworkErrorException {
    82 		// TODO Auto-generated method stub
    83 		return null;
    84 	}
    86 	@Override
    87 	public String getAuthTokenLabel(String authTokenType) {
    88 		// TODO Auto-generated method stub
    89 		return null;
    90 	}
    92 	@Override
    93 	public Bundle hasFeatures(AccountAuthenticatorResponse response,
    94 			Account account, String[] features) throws NetworkErrorException {
    95 		// TODO Auto-generated method stub
    96 		return null;
    97 	}
    99 	@Override
   100 	public Bundle updateCredentials(AccountAuthenticatorResponse response,
   101 			Account account, String authTokenType, Bundle options)
   102 			throws NetworkErrorException {
   103 		// TODO Auto-generated method stub
   104 		return null;
   105 	}
   107 }

mercurial