ConnectivityManagerInternal.java 698 Bytes
Newer Older
1 2 3
package chat.rocket.android.service;

import java.util.List;
Tiago Cunha's avatar
Tiago Cunha committed
4
import chat.rocket.core.models.ServerInfo;
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

/**
 * interfaces used for RocketChatService and RocketChatwebSocketThread.
 */
/*package*/ interface ConnectivityManagerInternal {
  int REASON_CLOSED_BY_USER = 101;
  int REASON_NETWORK_ERROR = 102;
  int REASON_SERVER_ERROR = 103;
  int REASON_UNKNOWN = 104;

  void resetConnectivityStateList();

  void ensureConnections();

  List<ServerInfo> getServerList();

  ServerInfo getServerInfoForHost(String hostname);

  void notifyConnectionEstablished(String hostname, String session);

  void notifyConnectionLost(String hostname, int reason);
26 27

  void notifyConnecting(String hostname);
28
}