C# Class ForumClientCore.NetworkLayer.ClientNetworkAdaptor

Show file Open project: sagioto/forum Class Usage Examples

Public Methods

Method Description
Activate ( string username, string password ) : System.Result
AddMessage ( string message ) : bool
AddModerator ( string adminUsername, string adminPassword, string usernameToAdd, string subforum ) : System.Result
AddSubforum ( string adminUsername, string adminPassword, string subforumName ) : System.Result
ClientNetworkAdaptor ( ) : System
ClientNetworkAdaptor ( bool GetCallBack ) : System

Constructor

Deactivate ( string username, string password ) : System.Result
EditPost ( Postkey oldPost, Post newPost, string username, string password ) : System.Result
GetData ( int value ) : string
GetNumberOfLoggedInUsers ( ) : int
ListenOnForum ( string username, string subForumName ) : bool
RemoveModerator ( string adminUsername, string adminPassword, string usernameToRemove, string subforum ) : System.Result
RemovePost ( Postkey postkey, string username, string password ) : System.Result
RemoveSubforum ( string adminUsername, string adminPassword, string subforumName ) : System.Result
ReplaceAdmin ( string oldAdminUsername, string oldAdminPassword, string newAdminUsername, string newAdminPassword ) : System.Result
ReplaceModerator ( string adminUsername, string adminPassword, string usernameToAdd, string usernameToRemove, string subforum ) : System.Result
ReportSubForumTotalPosts ( string adminUsername, string adminPassword, string subforumName ) : int
ReportUserTotalPosts ( string adminUsername, string adminPassword, string username ) : int
Subscribe ( string username ) : Post
netListener_OnUpdateFromServer ( Post message ) : void

Will be called when netListener will invoke its update event

Private Methods

Method Description
Ban ( string usernameToBan, string modUsername, string modPassword ) : System.Result
GetPost ( Postkey postkey ) : Post
GetReplies ( Postkey postkey ) : ForumShared.SharedDataTypes.Post[]

Get a Post using its PostKey

GetSubforum ( String subforumname ) : ForumShared.SharedDataTypes.Post[]

Get a Subforum by its name.

GetSubforumsList ( ) : string[]

Gets the list of sub forums from the server.

Login ( String username, String password ) : System.Result

Logs in to server with username and password.

Logout ( String username ) : System.Result

Logs out of server with username.

Post ( String subForumName, Post postToAdd ) : System.Result

Add a post to a sub forum.

Register ( String usename, String password ) : System.Result

Temp method - just to test connection to ws. To be deleted.

Registers a new user on the server.

Reply ( Postkey originalPost, Post newReply ) : System.Result

Add a reply to a post.

Search ( string query ) : ForumShared.SharedDataTypes.Post[]

Method Details

Activate() public method

public Activate ( string username, string password ) : System.Result
username string
password string
return System.Result

AddMessage() public method

public AddMessage ( string message ) : bool
message string
return bool

AddModerator() public method

public AddModerator ( string adminUsername, string adminPassword, string usernameToAdd, string subforum ) : System.Result
adminUsername string
adminPassword string
usernameToAdd string
subforum string
return System.Result

AddSubforum() public method

public AddSubforum ( string adminUsername, string adminPassword, string subforumName ) : System.Result
adminUsername string
adminPassword string
subforumName string
return System.Result

ClientNetworkAdaptor() public method

public ClientNetworkAdaptor ( ) : System
return System

ClientNetworkAdaptor() public method

Constructor
public ClientNetworkAdaptor ( bool GetCallBack ) : System
GetCallBack bool
return System

Deactivate() public method

public Deactivate ( string username, string password ) : System.Result
username string
password string
return System.Result

EditPost() public method

public EditPost ( Postkey oldPost, Post newPost, string username, string password ) : System.Result
oldPost Postkey
newPost ForumShared.SharedDataTypes.Post
username string
password string
return System.Result

GetData() public method

public GetData ( int value ) : string
value int
return string

GetNumberOfLoggedInUsers() public method

public GetNumberOfLoggedInUsers ( ) : int
return int

ListenOnForum() public method

public ListenOnForum ( string username, string subForumName ) : bool
username string
subForumName string
return bool

RemoveModerator() public method

public RemoveModerator ( string adminUsername, string adminPassword, string usernameToRemove, string subforum ) : System.Result
adminUsername string
adminPassword string
usernameToRemove string
subforum string
return System.Result

RemovePost() public method

public RemovePost ( Postkey postkey, string username, string password ) : System.Result
postkey Postkey
username string
password string
return System.Result

RemoveSubforum() public method

public RemoveSubforum ( string adminUsername, string adminPassword, string subforumName ) : System.Result
adminUsername string
adminPassword string
subforumName string
return System.Result

ReplaceAdmin() public method

public ReplaceAdmin ( string oldAdminUsername, string oldAdminPassword, string newAdminUsername, string newAdminPassword ) : System.Result
oldAdminUsername string
oldAdminPassword string
newAdminUsername string
newAdminPassword string
return System.Result

ReplaceModerator() public method

public ReplaceModerator ( string adminUsername, string adminPassword, string usernameToAdd, string usernameToRemove, string subforum ) : System.Result
adminUsername string
adminPassword string
usernameToAdd string
usernameToRemove string
subforum string
return System.Result

ReportSubForumTotalPosts() public method

public ReportSubForumTotalPosts ( string adminUsername, string adminPassword, string subforumName ) : int
adminUsername string
adminPassword string
subforumName string
return int

ReportUserTotalPosts() public method

public ReportUserTotalPosts ( string adminUsername, string adminPassword, string username ) : int
adminUsername string
adminPassword string
username string
return int

Subscribe() public method

public Subscribe ( string username ) : Post
username string
return ForumShared.SharedDataTypes.Post

netListener_OnUpdateFromServer() public method

Will be called when netListener will invoke its update event
public netListener_OnUpdateFromServer ( Post message ) : void
message ForumShared.SharedDataTypes.Post
return void