All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.auties.whatsapp.controller.builtin.DiscardingControllerSerializer Maven / Gradle / Ivy

package it.auties.whatsapp.controller.builtin;

import it.auties.whatsapp.api.ClientType;
import it.auties.whatsapp.controller.*;
import it.auties.whatsapp.model.mobile.PhoneNumber;

import java.util.LinkedList;
import java.util.Optional;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;

public class DiscardingControllerSerializer implements ControllerSerializer {
    private static final DiscardingControllerSerializer SINGLETON = new DiscardingControllerSerializer();
    private static final LinkedList EMPTY_IDS = new LinkedList<>();
    private static final LinkedList EMPTY_PHONE_NUMBERS = new LinkedList<>();

    public static ControllerSerializer of() {
        return SINGLETON;
    }

    @Override
    public LinkedList listIds(ClientType type) {
        return EMPTY_IDS;
    }

    @Override
    public LinkedList listPhoneNumbers(ClientType type) {
        return EMPTY_PHONE_NUMBERS;
    }

    @Override
    public Optional deserializeStoreKeysPair(UUID uuid, Long phoneNumber, String alias, ClientType clientType) {
        return Optional.empty();
    }

    @Override
    public CompletableFuture serializeKeys(Keys keys, boolean async) {
        return CompletableFuture.completedFuture(null);
    }

    @Override
    public CompletableFuture serializeStore(Store store, boolean async) {
        return CompletableFuture.completedFuture(null);
    }

    @Override
    public Optional deserializeKeys(ClientType type, UUID id) {
        return Optional.empty();
    }

    @Override
    public Optional deserializeKeys(ClientType type, long phoneNumber) {
        return Optional.empty();
    }

    @Override
    public Optional deserializeKeys(ClientType type, String alias) {
        return Optional.empty();
    }

    @Override
    public Optional deserializeStore(ClientType type, UUID id) {
        return Optional.empty();
    }

    @Override
    public Optional deserializeStore(ClientType type, long phoneNumber) {
        return Optional.empty();
    }

    @Override
    public Optional deserializeStore(ClientType type, String alias) {
        return Optional.empty();
    }

    @Override
    public void deleteSession(Controller controller) {

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy