public StatusCode ReleaseShow(RentedShowID rentedShowID) { StatusCode statusCode = StatusCode.sc_GeneralError; ReleaseShowRqst releaseShowRqst; ReleaseShowResp releaseShowResp; releaseShowRqst = ReleaseShowRqst.NewInstance(); releaseShowRqst.RentedShowID = rentedShowID; try { DataRequestor dataRequestor = DataRequestor.NewInstance(fSessionData); releaseShowResp = dataRequestor.ReleaseShowRequest(releaseShowRqst); statusCode = dataRequestor.StatusCode; if (dataRequestor.ResetNeeded) { Reset(); } } catch (Exception) { } return(statusCode); }
public DownloadShowList DownloadShowList() { StatusCode statusCode = StatusCode.sc_GeneralError; DownloadShowListRqst downloadShowListRqst; DownloadShowListResp downloadShowListResp; downloadShowListRqst = DownloadShowListRqst.NewInstance(); try { DataRequestor dataRequestor = DataRequestor.NewInstance(fSessionData); downloadShowListResp = dataRequestor.DownloadShowListRequest(downloadShowListRqst); statusCode = dataRequestor.StatusCode; if (dataRequestor.ResetNeeded) { Reset(); } if (statusCode == StatusCode.sc_Success) { return(downloadShowListResp.DownloadShowList); } } catch (Exception) { } return(null); }
public StatusCode Signon() { StatusCode statusCode = StatusCode.sc_GeneralError; fIsUserLoggedOn = false; if (fUserID.IsUndefined) { throw new Exception("Session.Signon: Missing UserID"); } if (fUserPassword.IsUndefined) { throw new Exception("Session.Signon: Missing UserPassword"); } SignonRqst signonRqst; SignonResp signonResp; //TODO: encrypt UserID and Password signonRqst = SignonRqst.NewInstance(); signonRqst.UserID = fUserID; signonRqst.Password = fUserPassword; signonRqst.Player = fPlayer; try { DataRequestor dataRequestor = DataRequestor.NewInstance(); signonResp = dataRequestor.SignonRequest(signonRqst); statusCode = dataRequestor.StatusCode; if (statusCode == StatusCode.sc_Success) { fSessionData = signonResp.SessionData; fSessionExpires = signonResp.SessionExpires; //fMemberPrefs = signonResp.MemberState.MemberPrefs; //fIncludeAdult = fMemberPrefs.IncludeAdult; //fCanAccessAdult = (fIncludeAdult == ina_Always); //fMemberProviderList = signonResp.MemberState.MemberProviderList; fIsUserLoggedOn = true; return(statusCode); } else if (statusCode == StatusCode.sc_InvalidUserIDPassword) { fBadUserCredentials = true; } } catch (Exception) { } return(statusCode); }
public bool PingServer() { StatusCode statusCode = StatusCode.sc_GeneralError; try { DataRequestor dataRequestor = DataRequestor.NewInstance(); statusCode = dataRequestor.PingRequest(); if (statusCode == StatusCode.sc_Success) { fCanPingServer = true; return(fCanPingServer); } } catch (Exception) { } return(fCanPingServer); }