package com.bitdubai.fermat_p2p_api.layer.p2p_communication;

import com.bitdubai.fermat_api.layer.all_definition.enums.NetworkServices;
import com.bitdubai.fermat_p2p_api.layer.p2p_communication.cloud_server.enums.RejectConnectionRequestReasons;

import java.util.Collection;
import java.util.UUID;

/**
 * Created by ciencias on 2/22/15.
 */
public interface CommunicationLayerManager {
    
    public void registerNetworkService (NetworkServices networkService) throws CommunicationException;

    public void unregisterNetworkService (NetworkServices networkService) throws CommunicationException;

    public void requestConnectionTo(NetworkServices networkServices, String remoteNetworkService) throws CommunicationException;

    public void acceptIncomingNetworkServiceConnectionRequest (CommunicationChannels communicationChannel, NetworkServices networkService, String remoteNetworkService ) throws CommunicationException;

    public void rejectIncomingNetworkServiceConnectionRequest (CommunicationChannels communicationChannel, NetworkServices networkService, String remoteNetworkService, RejectConnectionRequestReasons reason ) throws CommunicationException;

    public Collection<String> getActiveNetworkServiceConnectionIdentifiers(NetworkServices networkService) throws CommunicationException;

    public ServiceToServiceOnlineConnection getActiveNetworkServiceConnection(CommunicationChannels communicationChannel, NetworkServices networkService, String remoteNetworkService) throws CommunicationException;

// TODO: JORGE Manejo de Excepciones y entregarselas a Roberto
}

@@ -1522,16 +1522,146 @@
 ption;%0A%0A
+    public String getNetworkServiceChannelPublicKey(NetworkServices networkService) throws NetworkServiceNotRegisteredException;%0A%0A
 // TODO:

add prototype method getNetworkServiceChannelPublicKey(NetworkServices)