Esempio n. 1
0
        public void Update(string Description,string DisplayName, int VideoStorageServerID,
			int StreamingEncoderID,string SessionId, bool IsMarkedForDeletion,bool IsReady, 
			bool IsDesktopCapture, bool IsPrimaryCamera)
        {
            Functions F = new Functions();

            int LatestSessionId = this.SessionID;

            if(IsPrimaryCamera == true)
            {
                string sTSQL = "Update tblRecording SET IsPrimaryCamera = 0 WHERE SessionId = " + LatestSessionId;
                int TResults = F.ExecuteNonQuery(sTSQL);
            }
            if(IsDesktopCapture == true)
            {
                string sTSQL2 = "Update tblRecording SET IsDesktopCapture = 0 WHERE SessionId = " + LatestSessionId;
                int TResults2 = F.ExecuteNonQuery(sTSQL2);
            }
            string sSQL = "UPDATE tblRecording SET Name = '" + Description + "'" +
                ", DisplayName = '" + DisplayName + "'" +
                ", VideoStorageServerID = " + VideoStorageServerID +
                ", StreamingEncoderID = " + StreamingEncoderID +
                ", SessionId = '" + SessionId + "'" +
                ", IsMarkedForDeletion = " + Convert.ToInt32(IsMarkedForDeletion) +
                ", IsReady = " + Convert.ToInt32(IsReady) +
                ", IsDesktopCapture = " + Convert.ToInt32(IsDesktopCapture) +
                ", IsPrimaryCamera = " + Convert.ToInt32(IsPrimaryCamera) +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Esempio n. 2
0
 public bool RemoveSource(OCL.User AccessingUser,OCL.Source S)
 {
     try
     {
         Functions F = new Functions();
         return F.RemoveObjectFromGroup(AccessingUser,S,this);
     }
     catch(Exception Err)
     {
         throw new ApplicationException(Err.Message,Err.InnerException);
     }
 }
Esempio n. 3
0
 public void DownloadSessions(User AccessingUser,string sDestination, bool IncludeAttachments,bool ShowProgress,ref OCL.FTPTransfer FTP)
 {
     Functions F = new Functions();
     F.DownloadRecordingSession(AccessingUser,this,sDestination,IncludeAttachments, ShowProgress, ref FTP);
 }
Esempio n. 4
0
 public bool CanSee(OCL.User AccessingUser)
 {
     OCL.Functions F = new Functions();
     OCL.User DU = (OCL.User)F.GetUnassignedObject(OCL.OysterUnassignedObjects.User);
     return F.CheckGroupObjectPermission(AccessingUser,this,Convert.ToInt32(OCL.OysterObjectType.User),
         DU.ID,OCL.OysterPermissions.IsVisible);
 }
Esempio n. 5
0
        //        public Scenes CurrentScenes(OCL.User TargetUser, OCL.User AccessingUser)
        //        {
        //        
        //            OCL.Functions F = new Functions();
        //            Scenes RR = F.ALLVisibleScenes(TargetUser,AccessingUser,this);
        //            return RR;
        //        }
        public Sources CurrentSources(OCL.User AccessingUser)
        {
            Functions F = new Functions();
             Sources SE = F.AllVisibleSources(AccessingUser,this);

             return SE;
        }
Esempio n. 6
0
 public bool CanEditSourcePermissions(OCL.User AccessingUser)
 {
     if(AccessingUser.mvarIsSuperUser)
     {
         return true;
     }
     OCL.Functions F = new Functions();
     OCL.Source X = (OCL.Source)F.GetUnassignedObject(OCL.OysterUnassignedObjects.Source);
     return F.CheckGroupObjectPermission(AccessingUser,this,Convert.ToInt32(OCL.OysterObjectType.Source),
         X.ID,OCL.OysterPermissions.CanEdit);
 }
Esempio n. 7
0
 public bool CanRemoveScenes(OCL.User AccessingUser)
 {
     if(AccessingUser.mvarIsSuperUser)
     {
         return true;
     }
     OCL.Functions F = new Functions();
     OCL.Scene DS = (OCL.Scene)F.GetUnassignedObject(OCL.OysterUnassignedObjects.Scene);
     return F.CheckGroupObjectPermission(AccessingUser,this,Convert.ToInt32(OCL.OysterObjectType.Scene),
         DS.ID,OCL.OysterPermissions.CanDelete);
 }
Esempio n. 8
0
        public void Update(long RecordingSize)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblRecording SET DiskSize = " + RecordingSize +
                " WHERE ID = " + mvarID;
            int results = F.ExecuteSqlCommand(sSQL);
        }
Esempio n. 9
0
        public void Update(int LengthInSeconds)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblRecording SET PlayLength = " + LengthInSeconds +
                " WHERE ID = " + mvarID;
            int results = F.ExecuteSqlCommand(sSQL);
        }
Esempio n. 10
0
        public void Update(int VideoStorageServerId, int StreamingEncoderId)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblRecording SET VideoStorageServerID = " + VideoStorageServerID +
                ", StreamingEncoderID = " + StreamingEncoderID +
                " WHERE ID = " + mvarID;
            int results = F.ExecuteSqlCommand(sSQL);
        }
Esempio n. 11
0
        public void Update(bool IsDesktopCapture,bool IsPrimaryCamera)
        {
            Functions F = new Functions();

            int LatestSessionId = this.SessionID;

            if(IsPrimaryCamera == true)
            {
                string sTSQL = "Update tblRecording SET IsPrimaryCamera = 0 WHERE SessionId = " + LatestSessionId;
                int TResults = F.ExecuteNonQuery(sTSQL);
            }
            if(IsDesktopCapture == true)
            {
                string sTSQL = "Update tblRecording SET IsDesktopCapture = 0 WHERE SessionId = " + LatestSessionId;
                int TResults = F.ExecuteNonQuery(sTSQL);
            }
            string sSQL = "UPDATE tblRecording SET IsDesktopCapture = " + Convert.ToInt32(IsDesktopCapture) +
                ", IsPrimaryCamera = " + Convert.ToInt32(IsPrimaryCamera) +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Esempio n. 12
0
        /// <summary>
        /// Assigns Recording to another a different Session
        /// </summary>
        /// <param name="SessionId"></param>
        /// <param name="DummyVariable"></param>
        public void Update(int SessionId, bool DummyVariable)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblRecording SET SessionId = '" + SessionId + "'" +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Esempio n. 13
0
        public void Update(string DisplayName)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblRecording SET DisplayName = '" + DisplayName + "'" +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Esempio n. 14
0
        public void Update(string Description, string DisplayName, int VideoStorageServerID,
			int StreamingEncoderID,bool IsReady)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblRecording SET Name = '" + Description + "'" +
                ", DisplayName = '" + DisplayName + "'" +
                ", VideoStorageServerID = " + VideoStorageServerID +
                ", StreamingEncoderID = " + StreamingEncoderID +
                ", IsReady = " + Convert.ToInt32(IsReady) +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Esempio n. 15
0
 public bool CanAddControls(OCL.User AccessingUser)
 {
     if(AccessingUser.mvarIsSuperUser)
     {
         return true;
     }
     OCL.Functions F = new Functions();
     OCL.Control DC = (OCL.Control)F.GetUnassignedObject(OCL.OysterUnassignedObjects.Control);
     return F.CheckGroupObjectPermission(AccessingUser,this,Convert.ToInt32(OCL.OysterObjectType.Control),
         DC.ID,OCL.OysterPermissions.CanAdd);
 }
Esempio n. 16
0
        public void Update(bool IsReady)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblRecording SET IsReady = " + Convert.ToInt32(IsReady) +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Esempio n. 17
0
 public bool CanEditRecordingSessionPermissions(OCL.User AccessingUser)
 {
     if(AccessingUser.mvarIsSuperUser)
     {
         return true;
     }
     OCL.Functions F = new Functions();
     OCL.RecordingSession DRS = (OCL.RecordingSession)F.GetUnassignedObject(OCL.OysterUnassignedObjects.RecordingSession);
     return F.CheckGroupObjectPermission(AccessingUser,this,Convert.ToInt32(OCL.OysterObjectType.RecordingSession),
         DRS.ID,OCL.OysterPermissions.CanEdit);
 }
Esempio n. 18
0
 /// <summary>
 /// Checks the actual reported file size on disk and updates its size in the database.
 /// </summary>
 /// <returns>Returns the file size in bytes</returns>
 public long UpdateFileSizeOnDisk()
 {
     Functions F = new Functions();
     long FileSize = F.GetActualFileSizeOnDisk(this.Description);
     this.Update(FileSize);
     return FileSize;
 }
Esempio n. 19
0
 public bool CanEditUserPermissions(OCL.User AccessingUser)
 {
     if(AccessingUser.mvarIsSuperUser)
     {
         return true;
     }
     OCL.Functions F = new Functions();
     OCL.User DU = (OCL.User)F.GetUnassignedObject(OCL.OysterUnassignedObjects.User);
     return F.CheckGroupObjectPermission(AccessingUser,this,Convert.ToInt32(OCL.OysterObjectType.User),
         DU.ID,OCL.OysterPermissions.IsUsable);
 }
Esempio n. 20
0
        internal void SetIsMarkedForDeletion(bool IsMarkedForDeletion)
        {
            Functions F = new Functions();

            int intBool = Convert.ToInt32(IsMarkedForDeletion);

            string sSQL = "UPDATE tblRecording SET IsMarkedForDeletion = " + intBool +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Esempio n. 21
0
 public bool CanRemoveVideoStorageServers(OCL.User AccessingUser)
 {
     if(AccessingUser.mvarIsSuperUser)
     {
         return true;
     }
     OCL.Functions F = new Functions();
     OCL.VideoStorageServer X = (OCL.VideoStorageServer)F.GetUnassignedObject(OCL.OysterUnassignedObjects.VideoStorageServer);
     return F.CheckGroupObjectPermission(AccessingUser,this,Convert.ToInt32(OCL.OysterObjectType.VideoStorageServer),
         X.ID,OCL.OysterPermissions.CanDelete);
 }
Esempio n. 22
0
 /// <summary>
 /// Adds a Recording Session
 /// </summary>
 /// <param name="AccessingUser"></param>
 /// <param name="RS"></param>
 /// <returns></returns>
 public bool AddRecordingSession(OCL.User AccessingUser, OCL.RecordingSession RS,out string ErrorMessage)
 {
     try
     {
         Functions F = new Functions();
         return F.AddObjectToGroup(AccessingUser,RS,this, out ErrorMessage);
     }
     catch(Exception Err)
     {
         throw new ApplicationException(Err.Message);
     }
 }
Esempio n. 23
0
 //        public Recordings CurrentRecordings(OCL.User AccessingUser)
 //        {
 //            
 //                Functions F = new Functions();
 //                Recordings RR = F.GetAllVisibleRecordings(AccessingUser,this);
 //                return RR;
 //        }
 /// <summary>
 /// Returns all Scenes in this group that are visible to the Accessing User
 /// </summary>
 /// <param name="AccessingUser"></param>
 /// <returns></returns>
 public Scenes CurrentScenes(OCL.User AccessingUser)
 {
     OCL.Functions F = new Functions();
         Scenes RR = F.ALLVisibleScenes(AccessingUser,this);
         return RR;
 }
Esempio n. 24
0
 public bool AddSource(OCL.User AccessingUser, OCL.Source S,out string ErrorMessage)
 {
     try
     {
         Functions F = new Functions();
         return F.AddObjectToGroup(AccessingUser,S,this, out ErrorMessage);
     }
     catch(Exception Err)
     {
         throw new ApplicationException(Err.Message,Err.InnerException);
     }
 }
Esempio n. 25
0
 /// <summary>
 /// Returns all Users in this group that are visible to the AccesingUser
 /// </summary>
 /// <param name="AccessingUser"></param>
 /// <returns></returns>
 public Users CurrentUsers(OCL.User AccessingUser)
 {
     Functions F = new Functions();
         Users UU = F.All_Users(this, AccessingUser, OysterPermissions.IsVisible);
         return UU;
 }
Esempio n. 26
0
 public bool AddUser(OCL.User AccessingUser,OCL.User U,out string ErrorMessage)
 {
     try
     {
         Functions F = new Functions();
         return F.AddUser(AccessingUser,U,this, out ErrorMessage,false);
     }
     catch(Exception Err)
     {
         throw new ApplicationException(Err.Message);
     }
 }
Esempio n. 27
0
        public void RemoveUser(OCL.User AccessingUser,OCL.User U)
        {
            try
            {
                Functions F = new Functions();
                F.RemoveUserFromGroup(AccessingUser,U,this);

            }
            catch(Exception Err)
            {
                throw new ApplicationException(Err.Message,Err.InnerException);
            }
        }
Esempio n. 28
0
 public bool CanAddAttachments(OCL.User AccessingUser)
 {
     if(AccessingUser.mvarIsSuperUser)
     {
         return true;
     }
     OCL.Functions F = new Functions();
     OCL.Attachment X = (OCL.Attachment)F.GetUnassignedObject(OCL.OysterUnassignedObjects.Attachment);
     return F.CheckGroupObjectPermission(AccessingUser,this,Convert.ToInt32(OCL.OysterObjectType.Attachment),
         X.ID,OCL.OysterPermissions.CanAdd);
 }
Esempio n. 29
0
        public void Update(string Address, int ForwardingServerID, string StorageDirectory, int Port)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblMediaBufferServer SET Address = '" + Address.ToUpper() + "'" +
                ", ForwardingServerID = " + ForwardingServerID +
                ", StorageDirectory = '" + StorageDirectory + "'" +
                ", Port = " + Port +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Esempio n. 30
0
 public string RecordingUrl(OCL.User AccessingUser)
 {
     string sURL = "";
     if(this.CanWatch(AccessingUser))
     {
         OCL.Functions F = new Functions();
         sURL = F.BuildRecordingUrl(this.mvarID);
     }
     return sURL;
 }