/// <summary>
        /// Method is intented to retrieve data from AC 'Content' Folder. E.g.: Quizzes
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <param name="scoId">The sco identifier.</param>
        /// <returns>
        ///   <see cref="ApiStatus" />, containing ResultDocument if status code is OK and result document is not null; otherwise, null.
        /// </returns>
        public static ApiStatus GetQuizzesInRoom(this AdobeConnectXmlAPI adobeConnectXmlApi, string scoId)
        {
            ApiStatus s = adobeConnectXmlApi.ProcessApiRequest("sco-contents", String.Format("sco-id={0}", scoId));

            if (s.Code != StatusCodes.OK || s.ResultDocument == null)
            {
                return(null);
            }

            return(s);
        }
Exemple #2
0
        /// <summary>
        /// Removes one or more principals, either users or groups.
        /// To delete principals, you must have Administrator privilege.
        /// To delete multiple principals, specify multiple principal-id parameters. All of the principals
        /// you specify will be deleted.
        /// The principal-id can identify either a user or group. If you specify a user, the user is
        /// removed from any groups the user belongs to. If you specify a group, the group is deleted, but
        /// the users who belong to it are not.
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <param name="principalId">The principal identifier.</param>
        /// <returns>
        ///   <see cref="ApiStatus" />
        /// </returns>
        public static ApiStatus PrincipalDelete(this AdobeConnectXmlAPI adobeConnectXmlApi, string[] principalId)
        {
            for (int i = 0; i < principalId.Length; i++)
            {
                principalId[i] = "principal-id=" + principalId[i];
            }

            ApiStatus s = adobeConnectXmlApi.ProcessApiRequest("principals-delete", String.Join("&", principalId));

            return(s);
        }
Exemple #3
0
        public static async Task <ApiStatusWithSco> CreateFolder(this AdobeConnectXmlAPI adobeConnectXmlApi, string parentScoId, string name)
        {
            var sco = new Sco()
            {
                Name     = name,
                FolderId = parentScoId,
                ItemType = SCOtype.Folder
            };

            return(await ScoUpdate(adobeConnectXmlApi, sco));
        }
        public void Init()
        {
#if realapi
            this.Api = new AdobeConnectXmlAPI();
            this.Login();
#else
            this.Api = new AdobeConnectXmlAPI(new TestCommunicationProvider(), new SdkSettings {
                ServiceURL = @"tst://tstURL"
            });
#endif
        }
Exemple #5
0
        private static AdobeConnectXmlAPI _acConnect()
        {
            AdobeConnectXmlAPI acConn = new AdobeConnectXmlAPI();
            ApiStatus          s;

            //if (!acConn.Login(ConfigurationManager.AppSettings["ACxmlAPI_netUser"], ConfigurationManager.AppSettings["ACxmlAPI_netPassword"], out sInfo))
            {
                Console.WriteLine("Unable to logon. Please check cfg.");
                Environment.Exit(-1);
            }
            return(acConn);
        }
Exemple #6
0
        /// <summary>
        /// Returns true if user is Admin
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <param name="aclId">acl_id of the current user</param>
        /// <returns><see cref="bool"/> bool : user us admin ? true : false</returns>
        public static bool IsAdmin(AdobeConnectXmlAPI adobeConnectXmlApi, string aclId)
        {
            ApiStatus s = adobeConnectXmlApi.ProcessApiRequest("principal-list", "filter-type=admins");

            var principalItem = s.ResultDocument.XPathSelectElements("//principal-list/principal").FirstOrDefault();

            var groupId = principalItem.Attribute("principal-id").Value;

            ApiStatus apiStatus = adobeConnectXmlApi.ProcessApiRequest("principal-list", String.Format("group-id={0}&filter-is-member=true", groupId));

            return(apiStatus.ResultDocument.Descendants("principal").Where(a => a.Attribute("principal-id").Value == aclId).Count() == 1);
        }
        public ReportHelper(TransactionInfo[] tInfo, AdobeConnectXmlAPI acConnRef)
        {
            if (tInfo == null)
            {
                throw new ArgumentNullException("Transaction info can't be null");
            }

            tInfoColl = new List <TransactionInfo>();
            tInfoColl.AddRange(tInfo);

            acConn = acConnRef;
        }
Exemple #8
0
        /// <summary>
        /// Provides information about one principal, either a user or a group.
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <param name="principalId">The principal identifier.</param>
        /// <returns>
        ///   <see cref="PrincipalInfo" />
        /// </returns>
        /// <exception cref="System.ArgumentNullException">principalId</exception>
        public static PrincipalInfoStatus GetPrincipalInfo(this AdobeConnectXmlAPI adobeConnectXmlApi, string principalId)
        {
            if (String.IsNullOrEmpty(principalId))
            {
                throw new ArgumentNullException("principalId");
            }

            ApiStatus s = adobeConnectXmlApi.ProcessApiRequest("principal-info", String.Format("principal-id={0}", principalId));

            var principalInfoStatus = Helpers.WrapBaseStatusInfo <PrincipalInfoStatus>(s);

            if (s.Code != StatusCodes.OK || s.ResultDocument == null)
            {
                return(null);
            }

            var principalInfo = new PrincipalInfo();

            try
            {
                XElement contactData = s.ResultDocument.XPathSelectElement("//contact");

                if (contactData != null)
                {
                    principalInfo.Contact = XmlSerializerHelpersGeneric.FromXML <Contact>(contactData.CreateReader());
                }

                XElement preferencesData = s.ResultDocument.XPathSelectElement("//preferences");

                if (preferencesData != null)
                {
                    principalInfo.Preferences = XmlSerializerHelpersGeneric.FromXML <Preferences>(preferencesData.CreateReader());
                }

                XElement principalData = s.ResultDocument.XPathSelectElement("//principal");

                if (principalData != null)
                {
                    principalInfo.PrincipalData = XmlSerializerHelpersGeneric.FromXML <Principal>(principalData.CreateReader());
                }
            }
            catch (Exception ex)
            {
                throw;
            }

            principalInfoStatus.Result = principalInfo;

            return(principalInfoStatus);
        }
        /// <summary>
        /// Returns a list of SCOs within another SCO. The enclosing SCO can be a Folder, Meeting, or
        /// Curriculum.
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <param name="scoId">Room/Folder ID</param>
        /// <returns>
        ///   <see cref="EnumerableResultStatus{T}" />
        /// </returns>
        public static EnumerableResultStatus <XElement> GetMeetingsInRoomRaw(this AdobeConnectXmlAPI adobeConnectXmlApi, string scoId)
        {
            ApiStatus s = adobeConnectXmlApi.ProcessApiRequest("sco-contents", String.Format("sco-id={0}", scoId));

            var resultStatus = Helpers.WrapBaseStatusInfo <EnumerableResultStatus <XElement> >(s);

            if (s.Code != StatusCodes.OK || s.ResultDocument == null)
            {
                return(resultStatus);
            }

            resultStatus.Result = s.ResultDocument.XPathSelectElements("//sco");

            return(resultStatus);
        }
        /// <summary>
        /// Returns bulk questions information
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <param name="filterBy">optional 'filter by' params</param>
        /// <returns>
        ///   <see cref="EnumerableResultStatus{T}" />
        /// </returns>
        public static EnumerableResultStatus <XElement> Report_BulkQuestions(this AdobeConnectXmlAPI adobeConnectXmlApi, string filterBy)
        {
            ApiStatus s = adobeConnectXmlApi.ProcessApiRequest("report-bulk-questions", String.Format("{0}", filterBy));

            var resultStatus = Helpers.WrapBaseStatusInfo <EnumerableResultStatus <XElement> >(s);

            if (s.Code != StatusCodes.OK || s.ResultDocument == null)
            {
                return(resultStatus);
            }

            resultStatus.Result = s.ResultDocument.XPathSelectElements("//row");

            return(resultStatus);
        }
        /// <summary>
        /// Provides a summary of data about a quiz, including the number of times the quiz has been
        /// taken, average, high, and low scores, and other information.
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <param name="scoId">The sco identifier.</param>
        /// <returns>
        ///   <see cref="EnumerableResultStatus{T}" />
        /// </returns>
        public static EnumerableResultStatus <XElement> Report_QuizSummary(this AdobeConnectXmlAPI adobeConnectXmlApi, string scoId)
        {
            ApiStatus s = adobeConnectXmlApi.ProcessApiRequest("report-quiz-summary", String.Format("sco-id={0}", scoId));

            var resultStatus = Helpers.WrapBaseStatusInfo <EnumerableResultStatus <XElement> >(s);

            if (s.Code != StatusCodes.OK || s.ResultDocument == null)
            {
                return(resultStatus);
            }

            resultStatus.Result = s.ResultDocument.XPathSelectElements("//row");

            return(resultStatus);
        }
Exemple #12
0
 public static async Task Upload(this AdobeConnectXmlAPI adobeConnectXmlApi, Sco content)
 {
     using (var httpClient = new HttpClient())
     {
         if (adobeConnectXmlApi.Settings.HttpTimeoutSeconds.HasValue)
         {
             httpClient.Timeout = TimeSpan.FromSeconds(adobeConnectXmlApi.Settings.HttpTimeoutSeconds.Value);
         }
         var form = new MultipartFormDataContent();
         form.Add(new ByteArrayContent(content.Data), "file", content.Name);
         var url = string.Format("{0}/api/xml?action=sco-upload&sco-id={1}&session={2}",
                                 adobeConnectXmlApi.Settings.ServiceURL, content.ScoId, adobeConnectXmlApi.SessionInfo);
         await httpClient.PostAsync(url, form);
     }
 }
        /// <summary>
        /// Returns a list of users who attended an Acrobat Connect Meeting. The data is returned in row
        /// elements, one for each person who attended. If the Meeting hasn’t started or had no attendees,
        /// the response contains no rows.The response does not include Meeting hosts or users who were
        /// invited but did not attend
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <param name="scoId">Meeting ID</param>
        /// <param name="filterBy">optional 'filter by' params</param>
        /// <returns>
        ///   <see cref="EnumerableResultStatus{T}" />
        /// </returns>
        public static EnumerableResultStatus <XElement> Report_MeetingAttendance(this AdobeConnectXmlAPI adobeConnectXmlApi, string scoId, string filterBy)
        {
            ApiStatus s = adobeConnectXmlApi.ProcessApiRequest("report-meeting-attendance", String.Format("sco-id={0}&{1}", scoId, filterBy));

            var resultStatus = Helpers.WrapBaseStatusInfo <EnumerableResultStatus <XElement> >(s);

            if (s.Code != StatusCodes.OK || s.ResultDocument == null)
            {
                return(resultStatus);
            }

            resultStatus.Result = s.ResultDocument.XPathSelectElements("//row");

            return(resultStatus);
        }
        /// <summary>
        /// Creates or updates a user or group. The user or group (that is, the principal) is created or
        /// updated in the same account as the user making the call.
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <param name="principalSetup"><see cref="PrincipalSetup" /></param>
        /// <param name="principal"><see cref="Principal" /></param>
        /// <returns>
        ///   <see cref="ApiStatus" />
        /// </returns>
        public static async Task <ApiStatusWithPrincipal> PrincipalUpdate(this AdobeConnectXmlAPI adobeConnectXmlApi, PrincipalSetup principalSetup)
        {
            string cmdParams = Helpers.StructToQueryString(principalSetup, true);

            ApiStatusWithPrincipal s = ApiStatusWithPrincipal.FromApiStatus(await adobeConnectXmlApi.ProcessApiRequest("principal-update", cmdParams));

            if (s.Code != StatusCodes.OK || s.ResultDocument == null)
            {
                return(s);
            }

            s.Principal = XmlSerializerHelpersGeneric.FromXML <Principal>(s.ResultDocument.XPathSelectElement("//principal").CreateReader());

            return(s);
        }
        /// <summary>
        /// Returns the list of all rooms
        /// </summary>
        /// <remarks This function facilates the need to return the list of all
        /// urls/rooms for admin view
        /// <returns><see cref="List<List<bool>>"/>List of List of strings {}</returns>
        public static EnumerableResultStatus <MeetingItem> GetSharedList(AdobeConnectXmlAPI adobeConnectXmlApi)
        {
            var sharedMeetings = adobeConnectXmlApi.GetMeetingShortcuts().Result.FirstOrDefault <ScoShortcut>();

            var scoId = (sharedMeetings as ScoShortcut).ScoId;

            var expandedContents = adobeConnectXmlApi.ProcessApiRequest("sco-expanded-contents", String.Format("sco-id={0}&filter-type=meeting", scoId));

            var resultStatus = Helpers.WrapBaseStatusInfo <EnumerableResultStatus <MeetingItem> >(expandedContents);

            var folder = expandedContents.ResultDocument.Descendants("sco").Where(p => p.Attribute("folder-id").Value == scoId);

            resultStatus.Result = folder.Select(meeting => XmlSerializerHelpersGeneric.FromXML <MeetingItem>(meeting.CreateReader(), new XmlRootAttribute("sco")));

            return(resultStatus);
        }
        /// <summary>
        /// Updates the Meeting.
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <param name="meetingUpdateItem"><see cref="MeetingUpdateItem" /></param>
        /// <returns>
        ///   <see cref="ApiStatus" />
        /// </returns>
        public static ApiStatus MeetingUpdate(this AdobeConnectXmlAPI adobeConnectXmlApi, MeetingUpdateItem meetingUpdateItem)
        {
            if (meetingUpdateItem == null)
            {
                return(null);
            }

            if (String.IsNullOrEmpty(meetingUpdateItem.ScoId))
            {
                return(Helpers.WrapStatusException(StatusCodes.Invalid, StatusSubCodes.Format, new ArgumentNullException("MeetingItem", "ScoId must be set to update existing item")));
            }

            meetingUpdateItem.FolderId = null;

            return(adobeConnectXmlApi.ScoUpdate(meetingUpdateItem, out MeetingDetail meetingDetail));
        }
Exemple #17
0
        /// <summary>
        /// The server defines a special principal, public-access, which combines with values of permission-id to create special access permissions to meetings.
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <param name="aclId">*Required.
        /// The ID of a SCO, account, or principal
        /// that a principal has permission to act
        /// on. The acl-id is a sco-id, principalid,
        /// or account-id in other calls.</param>
        /// <param name="permissionId">*Required. <see cref="SpecialPermissionId" />.</param>
        /// <returns>
        ///   <see cref="ApiStatus" />
        /// </returns>
        /// <exception cref="System.NotImplementedException"></exception>
        public static ApiStatus SpecialPermissionsUpdate(this AdobeConnectXmlAPI adobeConnectXmlApi, string aclId, SpecialPermissionId permissionId)
        {
            switch (permissionId)
            {
            case SpecialPermissionId.Denied:
                return(PermissionsUpdate(adobeConnectXmlApi, aclId, "public-access", PermissionId.Denied));

            case SpecialPermissionId.Remove:
                return(PermissionsUpdate(adobeConnectXmlApi, aclId, "public-access", PermissionId.Remove));

            case SpecialPermissionId.ViewHidden:
                return(PermissionsUpdate(adobeConnectXmlApi, aclId, "public-access", PermissionId.ViewHidden));

            default:
                throw new NotImplementedException();
            }
        }
        /// <summary>
        /// Function that gets and returns all rooms
        /// </summary>
        /// <returns></returns>
        public List <List <string> > GetAllRooms()
        {
            LoginInfo             login = LoginInfo.currentUser;
            StatusInfo            sinfo;
            AdobeConnectXmlAPI    adobeObj = new AdobeConnectXmlAPI();
            List <List <string> > list     = new List <List <string> > {
            };

            if (adobeObj.Login(login.username, login.password, out sinfo))
            {
                bool isAdmin = adobeObj.IsAdmin(adobeObj.GetUserInfo().user_id);
                if (isAdmin)
                {
                    list = adobeObj.GetSharedList();
                }
            }
            return(list);
        }
Exemple #19
0
        public ActionResult Login(LoginUser user)
        {
            if (ModelState.IsValid)
            {
                AdobeConnectXmlAPI con = new AdobeConnectXmlAPI();
                StatusInfo         sInfo;
                if (con.Login(user.Username, user.Password, out sInfo))
                {
                    int      id     = int.Parse(con.GetUserInfo().user_id);
                    Identity Id     = new Identity(id, user.Username, "T");
                    DateTime expire = DateTime.Now.AddMinutes(FormsAuthentication.Timeout.TotalMinutes);
                    FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(Id.ID, user.Username, DateTime.Now, expire, false, Id.GetUserData());
                    string     hashTicket            = FormsAuthentication.Encrypt(ticket);
                    HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, hashTicket);
                    HttpContext.Response.Cookies.Add(cookie);
                    UserSession userSession = new UserSession(con.GetMyMeetings(), con.GetUserInfo());
                    using (AdobeConnectDB _db = new AdobeConnectDB()) {
                        var check = _db.AdobeUserInfo.Where(u => u.Username == user.Username).FirstOrDefault();
                        if (check == null)
                        {
                            var newlogin = new LoginUser();
                            newlogin.Username = user.Username;
                            newlogin.Password = user.Password;
                            newlogin.Id       = id;
                            _db.AdobeUserInfo.Add(newlogin);
                            _db.SaveChanges();
                        }
                        else
                        {
                            check = user;
                            _db.SaveChanges();
                        }
                    }
                    Session["UserSession"] = userSession;
                }
                else
                {
                    return(View("Login"));
                }
            }

            return(RedirectToAction("Index", "Dashboard"));
        }
        //This function gets the calendar list async.
        //Most inmportant funtion to load appoitment objects
        async public Task <List <CalendarData> > GetAllAppointments(string jsDate)
        {
            ///get calendar list data

            DateTime Date  = DateTime.Parse(jsDate);
            DateTime DateS = Date.AddHours(-2);
            DateTime DateM = Date.AddMonths(-1);

            using (AdobeConnectDB _db = new AdobeConnectDB())
            {
                AdobeConnectXmlAPI adobeObj = new AdobeConnectXmlAPI();

                List <Appointment> query = new List <Appointment>();
                //querying the data for the population of the calandar object
                try
                {
                    query = (from r in _db.Appointments where (r.end >= DateS && r.start >= DateM) select r).ToList();
                }
                catch (Exception e)
                {
                    System.Diagnostics.Debug.WriteLine(e);
                }

                List <CalendarData> calList = new List <CalendarData>();
                for (var i = 0; i < query.Count; i++)
                {
                    //res
                    Appointment res = query.ElementAt(i);
                    var         obj = ConstructObject(res, HttpContext.Current.User.Identity.Name, jsDate);
                    calList.Add(obj);
                }
                //standard for loop is faster

                /*  foreach (Appointment res in query)
                 * {
                 *    var obj = ConstructObject(res, HttpContext.Current.User.Identity.Name,jsDate);
                 *    calList.Add(obj);
                 * }*/
                return(await Task.Run(() => calList));
            }
            // return null;
        }
        /// <summary>
        /// Creates a new Meeting.
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <param name="meetingUpdateItem"><see cref="MeetingUpdateItem" /></param>
        /// <param name="meetingDetail"><see cref="MeetingDetail" /></param>
        /// <returns>
        ///   <see cref="ApiStatus" />
        /// </returns>
        public static async Task <ApiStatusWithMeetingDetail> MeetingCreate(this AdobeConnectXmlAPI adobeConnectXmlApi, MeetingUpdateItem meetingUpdateItem)
        {
            if (meetingUpdateItem == null)
            {
                return(null);
            }

            if (String.IsNullOrEmpty(meetingUpdateItem.FolderId))
            {
                return(ApiStatusWithMeetingDetail.FromApiStatus(Helpers.WrapStatusException(StatusCodes.Invalid, StatusSubCodes.Format, new ArgumentNullException("MeetingItem", "FolderID must be set to create new item"))));
            }

            if (meetingUpdateItem.MeetingItemType == SCOtype.NotSet)
            {
                return(ApiStatusWithMeetingDetail.FromApiStatus(Helpers.WrapStatusException(StatusCodes.Invalid, StatusSubCodes.Format, new ArgumentNullException("MeetingItem", "SCOtype must be set"))));
            }

            meetingUpdateItem.ScoId = null;

            return(await adobeConnectXmlApi.ScoUpdate(meetingUpdateItem));
        }
        /// <summary>
        /// Returns the number of concurrent Meeting participants you can have is determined by your Adobe Connect license.
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <returns>
        ///   <see cref="QuotaInfoStatus" />
        /// </returns>
        public static QuotaInfoStatus Report_Quotas(this AdobeConnectXmlAPI adobeConnectXmlApi)
        {
            ApiStatus s = adobeConnectXmlApi.ProcessApiRequest("report-quotas", String.Empty);

            var resultStatus = Helpers.WrapBaseStatusInfo <QuotaInfoStatus>(s);

            if (s.Code != StatusCodes.OK || s.ResultDocument == null)
            {
                return(resultStatus);
            }

            try
            {
                resultStatus.Result = XmlSerializerHelpersGeneric.FromXML <QuotaInfo>(s.ResultDocument.Descendants("report-quotas").FirstOrDefault().CreateReader());
                return(resultStatus);
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Exemple #23
0
        /// <summary>
        /// Updates the permissions a principal has to access a SCO, using a trio of principal-id, aclid,
        /// and permission-id. To update permissions for multiple principals or objects, specify
        /// multiple trios. You can update more than 200 permissions in a single call to permissionsupdate.
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <param name="aclId">*Required.
        /// The ID of a SCO, account, or principal
        /// that a principal has permission to act
        /// on. The acl-id is a sco-id, principalid,
        /// or account-id in other calls.</param>
        /// <param name="principalId">*Required.
        /// The ID of a user or group who has a
        /// permission (even if Denied or not set) to
        /// act on a SCO, an account, or another principal.</param>
        /// <param name="permissionId">*Required. <see cref="PermissionId" />.</param>
        /// <returns>
        ///   <see cref="ApiStatus" />
        /// </returns>
        public static ApiStatus PermissionsUpdate(this AdobeConnectXmlAPI adobeConnectXmlApi, string aclId, string principalId, PermissionId permissionId)
        {
            ApiStatus s = adobeConnectXmlApi.ProcessApiRequest("permissions-update", String.Format("acl-id={0}&principal-id={1}&permission-id={2}", aclId, principalId, Helpers.EnumToString(permissionId)));

            return(s);
        }
Exemple #24
0
        /// <summary>
        /// Adds one or more principals to a group, or removes one or more principals from a group.
        /// To update multiple principals and groups, specify multiple trios of group-id, principal-id,
        /// and is-member parameters.
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <param name="groupId">The ID of the group in which you want to add or change members.</param>
        /// <param name="principalId">The ID of the principal whose membership status you want to update. Returned by principal-info.</param>
        /// <param name="isMember">Whether the principal is added to (true) or deleted from (false) the group.</param>
        /// <returns>
        ///   <see cref="ApiStatus" />
        /// </returns>
        public static ApiStatus PrincipalGroupMembershipUpdate(this AdobeConnectXmlAPI adobeConnectXmlApi, string groupId, string principalId, bool isMember)
        {
            ApiStatus s = adobeConnectXmlApi.ProcessApiRequest("group-membership-update", String.Format("group-id={0}&principal-id={1}&is-member={2}", groupId, principalId, isMember ? 1 : 0));

            return(s);
        }
Exemple #25
0
        /// <summary>
        /// Changes a user’s password. A password can be changed in either of these cases:
        /// By an Administrator logged in to the account, with or without the user’s old password
        /// By any Connect Enterprise user, with the user’s principal-id number, Login Name, and old password
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <param name="userId">The user identifier.</param>
        /// <param name="passwordOld">The old password.</param>
        /// <param name="password">The new password.</param>
        /// <returns>
        ///   <see cref="ApiStatus" />
        /// </returns>
        public static ApiStatus PrincipalUpdatePassword(this AdobeConnectXmlAPI adobeConnectXmlApi, string userId, string passwordOld, string password)
        {
            ApiStatus s = adobeConnectXmlApi.ProcessApiRequest("user-update-pwd", String.Format("user-id={0}&password-old={1}&password={2}", userId, passwordOld, password));

            return(s);
        }
Exemple #26
0
 public static async Task <ApiStatusWithSco> ScoUpdate(AdobeConnectXmlAPI adobeConnectXmlApi, Sco sco)
 {
     return(await ScoGenericOperation(adobeConnectXmlApi, sco, "sco-update"));
 }
Exemple #27
0
 /// <summary>
 /// Provides a complete list of users and groups, including primary groups.
 /// </summary>
 /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
 /// <returns>
 ///   <see cref="EnumerableResultStatus{T}" />
 /// </returns>
 public static EnumerableResultStatus <PrincipalListItem> GetPrincipalList(this AdobeConnectXmlAPI adobeConnectXmlApi)
 {
     return(adobeConnectXmlApi.GetPrincipalList(String.Empty, String.Empty));
 }
Exemple #28
0
        /// <summary>
        /// Resets all permissions any principals have on a SCO to the permissions of its parent SCO. If
        /// the parent has no permissions set, the child SCO will also have no permissions.
        /// </summary>
        /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
        /// <param name="aclId">*Required.
        /// The ID of a SCO, account, or principal
        /// that a principal has permission to act
        /// on. The acl-id is a sco-id, principalid,
        /// or account-id in other calls.</param>
        /// <returns>
        ///   <see cref="ApiStatus" />
        /// </returns>
        public static ApiStatus PermissionsReset(this AdobeConnectXmlAPI adobeConnectXmlApi, string aclId)
        {
            ApiStatus s = adobeConnectXmlApi.ProcessApiRequest("permissions-reset", String.Format("acl-id={0}", aclId));

            return(s);
        }
 /// <summary>
 /// Provides information about all Acrobat Connect meetings for which the user is a Host, invited
 /// participant, or registered guest. The Meeting can be scheduled in the past, present, or future.
 /// </summary>
 /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
 /// <returns>
 ///   <see cref="EnumerableResultStatus{T}" />
 /// </returns>
 public static EnumerableResultStatus <MeetingItem> GetMyMeetings(this AdobeConnectXmlAPI adobeConnectXmlApi)
 {
     return(GetMyMeetings(adobeConnectXmlApi, null));
 }
Exemple #30
0
 /// <summary>
 /// UnSubscribes specific participant from specific Course/event
 /// </summary>
 /// <param name="adobeConnectXmlApi">The adobe connect XML API.</param>
 /// <param name="courseSco">The course sco.</param>
 /// <param name="principalId">principal/participant id</param>
 /// <returns>
 ///   <see cref="ApiStatus" />
 /// </returns>
 public static ApiStatus ParticipantUnsubscribe(this AdobeConnectXmlAPI adobeConnectXmlApi, string courseSco, string principalId)
 {
     return(PermissionsUpdate(adobeConnectXmlApi, courseSco, principalId, PermissionId.Remove));
 }