Exemple #1
0
        /// <summary>
        /// Generic error checking routine for transforming SDK errors into .NET exceptions
        /// </summary>
        public static void CheckAndThrowError()
        {
            /* Get the error code of the last SDK API function call */
            var errorCode = SDK.FPPool_GetLastError();

            if (0 != errorCode)
            {
                var errInfo = new FPErrorInfo();

                unsafe
                {
                    var ptr = (IntPtr)Marshal.AllocHGlobal((int)1024).ToPointer();

                    /* Get the error message of the last SDK API function call */
                    SDK.FPPool_GetLastErrorInfo(ptr);
                    errInfo = (FPErrorInfo)Marshal.PtrToStructure(ptr, typeof(FPErrorInfo));
                    Marshal.FreeHGlobal(ptr);
                }

                throw new FPLibraryException(errInfo);
            }
        }
Exemple #2
0
 public static void GetName(FPClipRef inClip, ref byte[] outName, ref FPInt ioNameLen)
 {
     SDK.FPClip_GetName8(inClip, outName, ref ioNameLen);
     SDK.CheckAndThrowError();
 }
Exemple #3
0
 public static void GetClipID(FPQueryResultRef inQueryResultRef, StringBuilder outClipID)
 {
     SDK.FPQueryResult_GetClipID(inQueryResultRef, outClipID);
     SDK.CheckAndThrowError();
 }
 public static void Close(FPRetentionClassRef inClassRef)
 {
     SDK.FPRetentionClass_Close(inClassRef);
     SDK.CheckAndThrowError();
 }
 public static void GetName(FPRetentionClassRef inClassRef, ref byte[] outName, ref FPInt ioNameLen)
 {
     SDK.FPRetentionClass_GetName8(inClassRef, outName, ref ioNameLen);
     SDK.CheckAndThrowError();
 }
Exemple #6
0
 public static void AuditedDelete(FPPoolRef inPool, string inClipID, string inReason, FPLong inOptions)
 {
     SDK.FPClip_AuditedDelete8(inPool, inClipID, inReason, inOptions);
     SDK.CheckAndThrowError();
 }
Exemple #7
0
 public static void TriggerEBREventWithClass(FPClipRef inClip, FPRetentionClassRef inClass)
 {
     SDK.FPClip_TriggerEBREventWithClass(inClip, inClass);
     SDK.CheckAndThrowError();
 }
Exemple #8
0
 public static void TriggerEBREvent(FPClipRef inClip)
 {
     SDK.FPClip_TriggerEBREvent(inClip);
     SDK.CheckAndThrowError();
 }
Exemple #9
0
 public static void GetDescriptionAttribute(FPClipRef inClip, string inAttrName, ref byte[] outAttrValue, ref FPInt ioAttrValueLen)
 {
     SDK.FPClip_GetDescriptionAttribute8(inClip, inAttrName, outAttrValue, ref ioAttrValueLen);
     SDK.CheckAndThrowError();
 }
Exemple #10
0
 public static void RemoveDescriptionAttribute(FPClipRef inClip, string inAttrName)
 {
     SDK.FPClip_RemoveDescriptionAttribute8(inClip, inAttrName);
     SDK.CheckAndThrowError();
 }
Exemple #11
0
 public static void SetDescriptionAttribute(FPClipRef inClip, string inAttrName, string inAttrValue)
 {
     SDK.FPClip_SetDescriptionAttribute8(inClip, inAttrName, inAttrValue);
     SDK.CheckAndThrowError();
 }
Exemple #12
0
 public static void RawRead(FPClipRef inClip, FPStreamRef inStream)
 {
     SDK.FPClip_RawRead(inClip, inStream);
     SDK.CheckAndThrowError();
 }
Exemple #13
0
 public static void Write(FPClipRef inClip, StringBuilder outClipID)
 {
     SDK.FPClip_Write(inClip, outClipID);
     SDK.CheckAndThrowError();
 }
Exemple #14
0
 public static void SetRetentionPeriod(FPClipRef inClip, FPLong inRetentionSecs)
 {
     SDK.FPClip_SetRetentionPeriod(inClip, inRetentionSecs);
     SDK.CheckAndThrowError();
 }
Exemple #15
0
 public static void GetCreationDate(FPClipRef inClip, StringBuilder outDate, ref FPInt ioDateLen)
 {
     SDK.FPClip_GetCreationDate8(inClip, outDate, ref ioDateLen);
     SDK.CheckAndThrowError();
 }
Exemple #16
0
 public static void EnableEBRWithPeriod(FPClipRef inClip, FPLong inSeconds)
 {
     SDK.FPClip_EnableEBRWithPeriod(inClip, inSeconds);
     SDK.CheckAndThrowError();
 }
Exemple #17
0
 public static void EnableEBRWithClass(FPClipRef inClip, FPRetentionClassRef inClass)
 {
     SDK.FPClip_EnableEBRWithClass(inClip, inClass);
     SDK.CheckAndThrowError();
 }
Exemple #18
0
 public static void GetDescriptionAttributeIndex(FPClipRef inClip, FPInt inIndex, ref byte[] outAttrName, ref FPInt ioAttrNameLen, ref byte[] outAttrValue, ref FPInt ioAttrValueLen)
 {
     SDK.FPClip_GetDescriptionAttributeIndex8(inClip, inIndex, outAttrName, ref ioAttrNameLen, outAttrValue, ref ioAttrValueLen);
     SDK.CheckAndThrowError();
 }
Exemple #19
0
 public static void TriggerEBREventWithPeriod(FPClipRef inClip, FPLong inSeconds)
 {
     SDK.FPClip_TriggerEBREventWithPeriod(inClip, inSeconds);
     SDK.CheckAndThrowError();
 }
Exemple #20
0
 public static void SetRetentionClass(FPClipRef inClipRef, FPRetentionClassRef inClassRef)
 {
     SDK.FPClip_SetRetentionClass(inClipRef, inClassRef);
     SDK.CheckAndThrowError();
 }
Exemple #21
0
 public static void Close(FPClipRef inClip)
 {
     SDK.FPClip_Close(inClip);
     SDK.CheckAndThrowError();
 }
Exemple #22
0
 public static void RemoveRetentionClass(FPClipRef inClipRef)
 {
     SDK.FPClip_RemoveRetentionClass(inClipRef);
     SDK.CheckAndThrowError();
 }
Exemple #23
0
 public static void Purge(FPPoolRef inPool, string inClipID)
 {
     SDK.FPClip_Purge(inPool, inClipID);
     SDK.CheckAndThrowError();
 }
Exemple #24
0
 public static void GetCanonicalFormat(string inClipID, byte[] outClipID)
 {
     SDK.FPClip_GetCanonicalFormat(inClipID, outClipID);
     SDK.CheckAndThrowError();
 }
 public static FPLong GetPeriod(FPRetentionClassRef inClassRef)
 {
     var retval = SDK.FPRetentionClass_GetPeriod(inClassRef);
     SDK.CheckAndThrowError();
     return retval;
 }
Exemple #26
0
 public static void GetStringFormat(byte[] inClipID, StringBuilder outClipID)
 {
     SDK.FPClip_GetStringFormat(inClipID, outClipID);
     SDK.CheckAndThrowError();
 }
Exemple #27
0
 public static void Close(FPQueryResultRef inQueryResultRef)
 {
     SDK.FPQueryResult_Close(inQueryResultRef);
     SDK.CheckAndThrowError();
 }
Exemple #28
0
 public static void SetRetentionHold(FPClipRef inClip, FPBool inHoldFlag, string inHoldID)
 {
     SDK.FPClip_SetRetentionHold8(inClip, inHoldFlag, inHoldID);
     SDK.CheckAndThrowError();
 }
Exemple #29
0
 public static void GetField(FPQueryResultRef inQueryResultRef, string inAttrName, ref byte[] outAttrValue, ref FPInt ioAttrValueLen)
 {
     SDK.FPQueryResult_GetField8(inQueryResultRef, inAttrName, outAttrValue, ref ioAttrValueLen);
     SDK.CheckAndThrowError();
 }
Exemple #30
0
 public static void GetEBREventTime(FPClipRef inClip, StringBuilder outEBREventTime, ref FPInt ioEBREventTimeLen)
 {
     SDK.FPClip_GetEBREventTime8(inClip, outEBREventTime, ref ioEBREventTimeLen);
     SDK.CheckAndThrowError();
 }