package RMIInterfaces;

import ChatBox.ChatClient;
import Client.PaintAttribute;
import com.sun.org.apache.regexp.internal.RE;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.Hashtable;

public interface ServerInterface extends Remote{
    String sendGson(ArrayList<String> keywords, ArrayList<String> contents) throws RemoteException;
    Hashtable receiveGson()throws RemoteException;

    //Serve for chatbox
    String sendMessage(String userName, String chatContent) throws RemoteException;
    String receiveMessage() throws RemoteException;

//    String sendClientList(ArrayList<ChatClient> chatClientList) throws RemoteException;
//    ArrayList receiveClientList() throws RemoteException;

    //Serve for drawing
    String sendPaints(String line, PaintAttribute attribute) throws RemoteException;
    ArrayList<String> receivePaints() throws RemoteException;
    PaintAttribute getAttribute(String attribute) throws RemoteException;

    //Serve for note broadcasting
    String sendNote(String noteType, String userName) throws RemoteException;
    String receiveNote() throws RemoteException;
    String tellSeverNew(boolean command) throws RemoteException;
    boolean serverCheckNew() throws RemoteException;

    void checkPassword(String userName, String password)throws RemoteException;
    boolean logginResult()throws RemoteException;

    void sendApproval(boolean approval)throws RemoteException;
    String listenForApproval()throws RemoteException;

    void registerUser(String userName, String password)throws RemoteException;
    boolean validRegister(String back)throws RemoteException;

}

@@ -1265,33 +1265,45 @@
 emoteException;%0A
+    //log in
 %0A
-
     void checkPa
@@ -1408,33 +1408,46 @@
 emoteException;%0A
+    //manager
 %0A
-
     void sendApp
@@ -1543,24 +1543,37 @@
 eException;%0A
+    //sign up
 %0A    void re

update user sys