/// <summary> /// To Join in the Existing Meeting /// </summary> /// <param name="MeetingName">To Join in the ExistingMeeting with the Specified MeetingName</param> /// <param name="MeetingId">To Join in the ExistingMeeting with the Specified MeetingId</param> /// <param name="Password">To Join in the ExistingMeeting with the Specified ModeratorPW/AttendeePW</param> /// <param name="ShowInBrowser">If its true,will Show the Meeting UI inatt the Browser </param> /// <returns></returns> public string JoinMeeting(string UserName, string MeetingId, bool ShowInBrowser = true)//, string Password, bool ShowInBrowser = false) { try { string StrServerUrl = this.config.ServerUrl; string StrSalt = this.config.ServerSecret; string StrParameters = "fullName=" + UserName + "&meetingID=" + MeetingId + "&redirect=true"; //"&password="******"&redirect=true"; string StrSHA1_CheckSum = ClsData.getSha1("join" + StrParameters + StrSalt); if (!ShowInBrowser) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(StrServerUrl + "/bigbluebutton/api/join?" + StrParameters + "&checksum=" + StrSHA1_CheckSum); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader sr = new StreamReader(response.GetResponseStream()); return(sr.ReadToEnd()); } else { return(StrServerUrl + "/join?" + StrParameters + "&checksum=" + StrSHA1_CheckSum); } } catch (Exception ex) { objclsLog.Write(ex.Message); return(null); } }
/// <summary> /// Creates the Meeting /// </summary> /// <param name="MeetingName">Creates the Meeting with the Specified MeetingName</param> /// <param name="MeetingId">Creates the Meeting with the Specified MeetingId</param> /// <param name="AttendeePW">Creates the Meeting with the Specified AttendeeePassword</param> /// <param name="moderatorPW">Creates the Meeting with the Specified ModeratorPassword</param> /// <returns></returns> public DataTable CreateMeeting(string MeetingName, string MeetingId)//, string AttendeePW, string moderatorPW) { try { string StrServerUrl = this.config.ServerUrl; string StrSalt = this.config.ServerSecret; string StrParameters = "name=" + MeetingName + "&meetingID=" + MeetingId;// + "&attendeePW=" + AttendeePW + "&moderatorPW=" + moderatorPW; string StrSHA1_CheckSum = ClsData.getSha1("create" + StrParameters + StrSalt); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(StrServerUrl + "/create?" + StrParameters + "&checksum=" + StrSHA1_CheckSum); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader sr = new StreamReader(response.GetResponseStream()); DataSet ds = new DataSet("DataSet1"); ds.ReadXml(sr); return(ds.Tables[0]); } catch (Exception ex) { objclsLog.Write(ex.Message); return(null); } }
/// <summary> /// To End the Meeting /// </summary> /// <param name="MeetingId">To End the Meeting with the Specified MeetingId</param> /// <param name="ModeratorPassword">To End the Meeting with the Specified ModeratorPW</param> /// <returns></returns> public DataTable EndMeeting(string MeetingId, string ModeratorPassword) { try { string StrServerUrl = this.config.ServerUrl; string StrSalt = this.config.ServerSecret; string StrParameters = "meetingID=" + MeetingId + "&password="******"end" + StrParameters + StrSalt); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(StrServerUrl + "/bigbluebutton/api/end?" + StrParameters + "&checksum=" + StrSHA1_CheckSum); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader sr = new StreamReader(response.GetResponseStream()); DataSet ds = new DataSet("DataSet1"); ds.ReadXml(sr); return(ds.Tables[0]); } catch (Exception ex) { objclsLog.Write(ex.Message); return(null); } }
/// <summary> /// To Get all the Meeting's Information running in the Server /// </summary> /// <returns></returns> public DataTable getMeetings() { try { string StrServerUrl = this.config.ServerUrl; string StrSalt = this.config.ServerSecret; Random r = new Random(0); string StrParameters = "random=" + r.Next(100).ToString(); string StrSHA1_CheckSum = ClsData.getSha1("getMeetings" + StrParameters + StrSalt); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(StrServerUrl + "/bigbluebutton/api/getMeetings?" + StrParameters + "&checksum=" + StrSHA1_CheckSum); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader sr = new StreamReader(response.GetResponseStream()); DataSet ds = new DataSet("DataSet1"); ds.ReadXml(sr); return(ds.Tables[0]); } catch (Exception ex) { objclsLog.Write(ex.Message); return(null); } }