1
- / home/ yagox// git/Tweetorro/src/server/ServerTrait.scala
1
+ package server
2
+
3
+ import java .rmi .Remote
4
+ import java .rmi .RemoteException
5
+ import client .ClientTrait
6
+
7
+ object Shared {
8
+ case class DMTweet (user : String , msg : String , date : String )
9
+ case class DMT (id : String , user : String , msg : String , date : String )
10
+ case class Test (f : Int => Unit )
11
+ }
12
+
13
+ trait ServerTrait extends Remote {
14
+ import Shared ._
15
+
16
+ @ throws(classOf [RemoteException ])
17
+ def registerForCallback (userName : String ,callback : ClientTrait ): Unit
18
+
19
+ @ throws(classOf [RemoteException ])
20
+ def searchUsers (name : String ): List [String ]
21
+
22
+ @ throws(classOf [RemoteException ])
23
+ def sendDM (dm : DMTweet , userTo : String ): Unit
24
+
25
+ @ throws(classOf [RemoteException ])
26
+ def getDM (user : String , number : Int ): List [DMT ]
27
+
28
+ @ throws(classOf [RemoteException ])
29
+ def createUser (user : String , pass : String ): Boolean
30
+
31
+ @ throws(classOf [RemoteException ])
32
+ def login (user : String , pass : String ): Boolean
33
+
34
+ @ throws(classOf [RemoteException ])
35
+ def sendTweet (tweet : DMTweet ): Unit
36
+
37
+ @ throws(classOf [RemoteException ])
38
+ def retweet (user : String , tweetID : String ): Boolean
39
+
40
+ @ throws(classOf [RemoteException ])
41
+ def follow (user : String , userID : String ): Boolean
42
+
43
+ @ throws(classOf [RemoteException ])
44
+ def unfollow (user : String , userID : String ): Boolean
45
+
46
+ @ throws(classOf [RemoteException ])
47
+ def followers (user : String , number : Int ): List [String ]
48
+
49
+ @ throws(classOf [RemoteException ])
50
+ def following (user : String , number : Int ): List [String ]
51
+
52
+ @ throws(classOf [RemoteException ])
53
+ def logoutRemote (user : String ): Boolean
54
+
55
+ @ throws(classOf [RemoteException ])
56
+ def checkRemoteProfile (user : String , param : String ): Option [String ]
57
+
58
+ @ throws(classOf [RemoteException ])
59
+ def modifyRemoteProfile (user : String , param : String , value : String ): Boolean
60
+
61
+ @ throws(classOf [RemoteException ])
62
+ def getTweets (user : String , number : Int ): List [DMT ]
63
+
64
+ @ throws(classOf [RemoteException ])
65
+ def test (f : Test ): Unit
66
+ }
67
+
68
+
69
+
0 commit comments