![]() |
UnityMol
0.9.6-875
UnityMol viewer / In developement
|
Public Member Functions | |
delegate void | RequestResponseDelegate (ResponseType responseType, JSONNode jsonResponse, string callee) |
void | PerformRequest (string command, Dictionary< string, object > fields=null, RequestResponseDelegate onResponse=null, string authToken="") |
void | PerformFormRequest (string command, WWWForm wwwForm, string filename, string fileData, RequestResponseDelegate onResponse=null, string authToken="") |
Session[] | getSessions () |
void | populateSessions (JSONNode responseData) |
IEnumerator | downloadSessionFile (string sessionSlug) |
delegate void | LoggedIn () |
delegate void | Connecting () |
delegate void | LoginFailed (string errorMsg) |
delegate void | SessionSuccess () |
delegate void | RetrievingSession () |
delegate void | SessionFailed (string errorMsg) |
delegate void | SubmissionSuccess () |
delegate void | Submitting () |
delegate void | SubmissionFailed (string errorMsg) |
bool | logged () |
void | Login (string username, string password) |
void | Logout () |
void | SubmitPDB (string sessionSlug) |
void | RetrieveSessions () |
Public Attributes | |
bool | UseProduction = true |
string | ProductionUrl = "https://hirerna.galaxy.ibpc.fr/api/" |
string | DevelopmentUrl = "http://localhost:8000/api/" |
LoggedIn | OnLoggedIn |
Connecting | OnConnection |
LoginFailed | OnLoginFailed |
SessionSuccess | OnSessionSuccess |
RetrievingSession | OnSession |
SessionFailed | OnSessionFailed |
SubmissionSuccess | OnSubmissionSuccess |
Submitting | OnSubmission |
SubmissionFailed | OnSubmissionFailed |
Static Public Attributes | |
static string | progress = "" |
Properties | |
string | hostUrl [get] |
Private Member Functions | |
IEnumerator | HandleResponse (HttpWebResponse response, RequestResponseDelegate onResponse, string callee) |
IEnumerator | HandleRequest (WWW request, RequestResponseDelegate onResponse, string callee) |
void | OnLoginResponse (ResponseType responseType, JSONNode responseData, string callee) |
void | OnLogoutResponse (ResponseType responseType, JSONNode responseData, string callee) |
void | OnSubmittedPDB (ResponseType responseType, JSONNode responseData, string callee) |
void | OnRetrievedSessions (ResponseType responseType, JSONNode responseData, string callee) |
Private Attributes | |
List< Session > | sessions = new List<Session>() |
string | authenticationToken = "" |
Definition at line 29 of file BackendManager.cs.
delegate void BackendManager.Connecting | ( | ) |
IEnumerator BackendManager.downloadSessionFile | ( | string | sessionSlug | ) |
Definition at line 48 of file HiRERNABackend.cs.
References Molecule3D.clearScene(), File, and UI.UIData.loadHireRNA.
Referenced by HiRERNAContestOldGUI.HiRERNAContestMenu().
Session [] BackendManager.getSessions | ( | ) |
Definition at line 27 of file HiRERNABackend.cs.
Referenced by HiRERNAContestOldGUI.HiRERNAContestMenu().
|
private |
Definition at line 181 of file BackendManager.cs.
References SimpleJSON.JSON.Parse().
Referenced by PerformRequest().
|
private |
Definition at line 130 of file BackendManager.cs.
References SimpleJSON.JSON.Parse().
Referenced by PerformFormRequest().
bool BackendManager.logged | ( | ) |
Definition at line 105 of file HiRERNABackend.cs.
Referenced by HiRERNAContestOldGUI.HiRERNAContestMenu().
delegate void BackendManager.LoggedIn | ( | ) |
void BackendManager.Login | ( | string | username, |
string | password | ||
) |
Definition at line 110 of file HiRERNABackend.cs.
Referenced by HiRERNAContestOldGUI.HiRERNAContestMenu().
delegate void BackendManager.LoginFailed | ( | string | errorMsg | ) |
void BackendManager.Logout | ( | ) |
Definition at line 150 of file HiRERNABackend.cs.
Referenced by HiRERNAContestOldGUI.HiRERNAContestMenu().
|
private |
Definition at line 120 of file HiRERNABackend.cs.
|
private |
Definition at line 155 of file HiRERNABackend.cs.
|
private |
Definition at line 202 of file HiRERNABackend.cs.
|
private |
Definition at line 178 of file HiRERNABackend.cs.
void BackendManager.PerformFormRequest | ( | string | command, |
WWWForm | wwwForm, | ||
string | filename, | ||
string | fileData, | ||
RequestResponseDelegate | onResponse = null , |
||
string | authToken = "" |
||
) |
Performs a request to the backend.
command | Command that is pasted after the url to backend. For example: "localhost:8000/api/" + command |
wwwForm | A WWWForm to send with the request |
onResponse | A callback which will be called when we retrieve the response |
authToken | An optional authToken which, when set will be put in the Authorization header |
Definition at line 96 of file BackendManager.cs.
References UnityMolMain.getVersionString(), HandleResponse(), and hostUrl.
void BackendManager.PerformRequest | ( | string | command, |
Dictionary< string, object > | fields = null , |
||
RequestResponseDelegate | onResponse = null , |
||
string | authToken = "" |
||
) |
Performs a request to the backend.
command | Command that is pasted after the url to backend. For example: "localhost:8000/api/" + command |
fields | A list of fields that are send as parameters to the backend |
onResponse | A callback which will be called when we retrieve the response |
authToken | An optional authToken which, when set will be put in the Authorization header |
Definition at line 63 of file BackendManager.cs.
References HandleRequest(), and hostUrl.
void BackendManager.populateSessions | ( | JSONNode | responseData | ) |
Populates the sessions list with received JSON data passed as argument.
Definition at line 33 of file HiRERNABackend.cs.
References SimpleJSON.JSONNode.AsInt, SimpleJSON.JSONNode.Count, Session.id, Session.name, Session.slug, and SimpleJSON.JSONNode.ToString().
delegate void BackendManager.RequestResponseDelegate | ( | ResponseType | responseType, |
JSONNode | jsonResponse, | ||
string | callee | ||
) |
The response delegate
responseType | |
jsonResponse | the json object of the response, this can be null when no content is returned(eg. HTTP 204) |
callee | the name of the method doing the request(used for testing) |
void BackendManager.RetrieveSessions | ( | ) |
Definition at line 193 of file HiRERNABackend.cs.
Referenced by HiRERNAContestOldGUI.HiRERNAContestMenu(), and HiRERNAContestOldGUI.OnLoggedIn().
delegate void BackendManager.RetrievingSession | ( | ) |
delegate void BackendManager.SessionFailed | ( | string | errorMsg | ) |
delegate void BackendManager.SessionSuccess | ( | ) |
delegate void BackendManager.SubmissionFailed | ( | string | errorMsg | ) |
delegate void BackendManager.SubmissionSuccess | ( | ) |
void BackendManager.SubmitPDB | ( | string | sessionSlug | ) |
Definition at line 162 of file HiRERNABackend.cs.
References SnapshotManager.generateSnapshot(), and HiRERNAContestOldGUI.username.
Referenced by HiRERNAContestOldGUI.HiRERNAContestMenu().
delegate void BackendManager.Submitting | ( | ) |
|
private |
Definition at line 104 of file HiRERNABackend.cs.
string BackendManager.DevelopmentUrl = "http://localhost:8000/api/" |
Definition at line 46 of file BackendManager.cs.
Connecting BackendManager.OnConnection |
Definition at line 84 of file HiRERNABackend.cs.
Referenced by HiRERNAContestOldGUI.HiRERNAContestMenu().
LoggedIn BackendManager.OnLoggedIn |
Definition at line 83 of file HiRERNABackend.cs.
Referenced by HiRERNAContestOldGUI.HiRERNAContestMenu().
LoginFailed BackendManager.OnLoginFailed |
Definition at line 85 of file HiRERNABackend.cs.
Referenced by HiRERNAContestOldGUI.HiRERNAContestMenu().
RetrievingSession BackendManager.OnSession |
Definition at line 94 of file HiRERNABackend.cs.
SessionFailed BackendManager.OnSessionFailed |
Definition at line 95 of file HiRERNABackend.cs.
SessionSuccess BackendManager.OnSessionSuccess |
Definition at line 93 of file HiRERNABackend.cs.
Submitting BackendManager.OnSubmission |
Definition at line 101 of file HiRERNABackend.cs.
Referenced by HiRERNAContestOldGUI.HiRERNAContestMenu().
SubmissionFailed BackendManager.OnSubmissionFailed |
Definition at line 102 of file HiRERNABackend.cs.
Referenced by HiRERNAContestOldGUI.HiRERNAContestMenu().
SubmissionSuccess BackendManager.OnSubmissionSuccess |
Definition at line 100 of file HiRERNABackend.cs.
Referenced by HiRERNAContestOldGUI.HiRERNAContestMenu().
string BackendManager.ProductionUrl = "https://hirerna.galaxy.ibpc.fr/api/" |
Definition at line 44 of file BackendManager.cs.
|
static |
Definition at line 25 of file HiRERNABackend.cs.
Referenced by HiRERNAContestOldGUI.HiRERNAContestMenu().
Definition at line 24 of file HiRERNABackend.cs.
bool BackendManager.UseProduction = true |
Definition at line 42 of file BackendManager.cs.
|
getprivate |
Definition at line 50 of file BackendManager.cs.
Referenced by PerformFormRequest(), and PerformRequest().