Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 365434d2 authored by David Luhmer's avatar David Luhmer Committed by GitHub
Browse files

Merge pull request #18 from nextcloud/addRetrofitHelper

Add retrofit helper
parents 7fbf82a0 b302e17b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -50,4 +50,7 @@ dependencies {
    implementation 'io.reactivex.rxjava2:rxjava:2.1.4'

    implementation 'commons-io:commons-io:2.6'

    implementation 'com.squareup.retrofit2:retrofit:2.3.0'
    implementation 'com.squareup.okhttp3:okhttp:3.8.0'
}
+0 −1
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@ import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.RequiresApi;
import android.widget.Toast;

import java.io.IOException;
import java.util.ArrayList;
+0 −2
Original line number Diff line number Diff line
@@ -7,8 +7,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import de.luhmer.owncloud.accountimporter.aidl.IThreadListener;

/**
 *  Nextcloud SingleSignOn
 *
+1 −1
Original line number Diff line number Diff line
@@ -26,8 +26,8 @@ import java.lang.reflect.Type;

import de.luhmer.owncloud.accountimporter.aidl.IInputStreamService;
import de.luhmer.owncloud.accountimporter.aidl.IThreadListener;
import de.luhmer.owncloud.accountimporter.aidl.ParcelFileDescriptorUtil;
import de.luhmer.owncloud.accountimporter.aidl.NextcloudRequest;
import de.luhmer.owncloud.accountimporter.aidl.ParcelFileDescriptorUtil;
import de.luhmer.owncloud.accountimporter.exceptions.NextcloudFilesAppAccountNotFoundException;
import de.luhmer.owncloud.accountimporter.exceptions.TokenMismatchException;
import de.luhmer.owncloud.accountimporter.model.SingleSignOnAccount;
+268 −0
Original line number Diff line number Diff line
package de.luhmer.owncloud.accountimporter.helper;

import android.support.annotation.Nullable;

import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;

import okio.Buffer;
import okio.BufferedSource;
import okio.ByteString;
import okio.Options;
import okio.Sink;
import okio.Timeout;

/**
 *  Nextcloud SingleSignOn
 *
 *  @author David Luhmer
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

public class BufferedSourceSSO implements BufferedSource {

    private InputStream mInputStream;

    public BufferedSourceSSO(InputStream inputStream) {
        this.mInputStream = inputStream;
    }

    @Override
    public Buffer buffer() {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public boolean exhausted() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public void require(long byteCount) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public boolean request(long byteCount) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public byte readByte() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public short readShort() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public short readShortLe() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public int readInt() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public int readIntLe() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public long readLong() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public long readLongLe() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public long readDecimalLong() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public long readHexadecimalUnsignedLong() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public void skip(long byteCount) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public ByteString readByteString() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public ByteString readByteString(long byteCount) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public int select(Options options) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public byte[] readByteArray() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public byte[] readByteArray(long byteCount) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public int read(byte[] sink) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public void readFully(byte[] sink) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public int read(byte[] sink, int offset, int byteCount) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public void readFully(Buffer sink, long byteCount) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public long readAll(Sink sink) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public String readUtf8() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public String readUtf8(long byteCount) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Nullable
    @Override
    public String readUtf8Line() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public String readUtf8LineStrict() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public String readUtf8LineStrict(long limit) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public int readUtf8CodePoint() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public String readString(Charset charset) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public String readString(long byteCount, Charset charset) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public long indexOf(byte b) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public long indexOf(byte b, long fromIndex) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public long indexOf(byte b, long fromIndex, long toIndex) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public long indexOf(ByteString bytes) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public long indexOf(ByteString bytes, long fromIndex) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public long indexOfElement(ByteString targetBytes) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public long indexOfElement(ByteString targetBytes, long fromIndex) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public boolean rangeEquals(long offset, ByteString bytes) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public boolean rangeEquals(long offset, ByteString bytes, int bytesOffset, int byteCount) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public InputStream inputStream() {
        return mInputStream;
    }

    @Override
    public long read(Buffer sink, long byteCount) throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public Timeout timeout() {
        throw new UnsupportedOperationException("Not implemented");
    }

    @Override
    public void close() throws IOException {
        throw new UnsupportedOperationException("Not implemented");
    }
}
Loading