/// <summary> /// This method takes care of letting the user accept invitations by calling the /// server. /// </summary> /// <param name="accepts"></param> internal void AcceptInvitations(string[] accepts) { using (ClientSystemFacade2Client proxy = new ClientSystemFacade2Client()) { proxy.AcceptInvitations(password, username, accepts); } }
/// <summary> /// This method takes care of sharing a folder by calling the server. /// </summary> /// <param name="users"></param> /// <param name="folder"></param> /// <param name="permission"></param> internal void ShareFolder(string[] users, string folder, string permission) { using (ClientSystemFacade2Client proxy = new ClientSystemFacade2Client()) { proxy.ShareFolder(password, username, users, folder, permission); } }
/// <summary> /// This method takes care of retriving the current invitations to the user. /// </summary> /// <returns></returns> internal string[] GetInvitations() { string[] result; using (ClientSystemFacade2Client proxy = new ClientSystemFacade2Client()) { result = proxy.GetInvitations(password, username); } return(result); }
/// <summary> /// This method takes care of synchronizing the users local files with /// the files on the server. First it reads the files from the disk, then /// it sends them to the server and at last it saves the retrieved files from /// the server to the local disk. /// </summary> internal void Synchronize() { string[][] files = GetAllFilesFromDisk().ToArray(); using (ClientSystemFacade2Client proxy = new ClientSystemFacade2Client()) { files = proxy.Synchronize(username, password, files); } SaveAllFilesToDisk(files); }
/// <summary> /// This method takes care of sharing documents /// </summary> /// <param name="users"></param> /// <param name="documents"></param> /// <param name="permission"></param> internal void ShareDocuments(string[] users, string[] documents, string permission) { Synchronize(); using (ClientSystemFacade2Client proxy = new ClientSystemFacade2Client()) { foreach (string doc in documents) { proxy.ShareDocuments(username, password, users, doc, permission); } } }
/// <summary> /// This method takes care of retriving the current invitations to the user. /// </summary> /// <returns></returns> internal string[] GetInvitations() { string[] result; using (ClientSystemFacade2Client proxy = new ClientSystemFacade2Client()) { result = proxy.GetInvitations(password, username); } return result; }