Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
 public static void GetName(FPClipRef inClip, ref byte[] outName, ref FPInt ioNameLen)
 {
     SDK.FPClip_GetName8(inClip, outName, ref ioNameLen);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 3
0
 public static void GetClipID(FPQueryResultRef inQueryResultRef, StringBuilder outClipID)
 {
     SDK.FPQueryResult_GetClipID(inQueryResultRef, outClipID);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 4
0
 public static void Close(FPRetentionClassRef inClassRef)
 {
     SDK.FPRetentionClass_Close(inClassRef);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 5
0
 public static void GetName(FPRetentionClassRef inClassRef, ref byte[] outName, ref FPInt ioNameLen)
 {
     SDK.FPRetentionClass_GetName8(inClassRef, outName, ref ioNameLen);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 6
0
 public static void AuditedDelete(FPPoolRef inPool, string inClipID, string inReason, FPLong inOptions)
 {
     SDK.FPClip_AuditedDelete8(inPool, inClipID, inReason, inOptions);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 7
0
 public static void TriggerEBREventWithClass(FPClipRef inClip, FPRetentionClassRef inClass)
 {
     SDK.FPClip_TriggerEBREventWithClass(inClip, inClass);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 8
0
 public static void TriggerEBREvent(FPClipRef inClip)
 {
     SDK.FPClip_TriggerEBREvent(inClip);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 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();
 }
Exemplo n.º 10
0
 public static void RemoveDescriptionAttribute(FPClipRef inClip, string inAttrName)
 {
     SDK.FPClip_RemoveDescriptionAttribute8(inClip, inAttrName);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 11
0
 public static void SetDescriptionAttribute(FPClipRef inClip, string inAttrName, string inAttrValue)
 {
     SDK.FPClip_SetDescriptionAttribute8(inClip, inAttrName, inAttrValue);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 12
0
 public static void RawRead(FPClipRef inClip, FPStreamRef inStream)
 {
     SDK.FPClip_RawRead(inClip, inStream);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 13
0
 public static void Write(FPClipRef inClip, StringBuilder outClipID)
 {
     SDK.FPClip_Write(inClip, outClipID);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 14
0
 public static void SetRetentionPeriod(FPClipRef inClip, FPLong inRetentionSecs)
 {
     SDK.FPClip_SetRetentionPeriod(inClip, inRetentionSecs);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 15
0
 public static void GetCreationDate(FPClipRef inClip, StringBuilder outDate, ref FPInt ioDateLen)
 {
     SDK.FPClip_GetCreationDate8(inClip, outDate, ref ioDateLen);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 16
0
 public static void EnableEBRWithPeriod(FPClipRef inClip, FPLong inSeconds)
 {
     SDK.FPClip_EnableEBRWithPeriod(inClip, inSeconds);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 17
0
 public static void EnableEBRWithClass(FPClipRef inClip, FPRetentionClassRef inClass)
 {
     SDK.FPClip_EnableEBRWithClass(inClip, inClass);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 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();
 }
Exemplo n.º 19
0
 public static void TriggerEBREventWithPeriod(FPClipRef inClip, FPLong inSeconds)
 {
     SDK.FPClip_TriggerEBREventWithPeriod(inClip, inSeconds);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 20
0
 public static void SetRetentionClass(FPClipRef inClipRef, FPRetentionClassRef inClassRef)
 {
     SDK.FPClip_SetRetentionClass(inClipRef, inClassRef);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 21
0
 public static void Close(FPClipRef inClip)
 {
     SDK.FPClip_Close(inClip);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 22
0
 public static void RemoveRetentionClass(FPClipRef inClipRef)
 {
     SDK.FPClip_RemoveRetentionClass(inClipRef);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 23
0
 public static void Purge(FPPoolRef inPool, string inClipID)
 {
     SDK.FPClip_Purge(inPool, inClipID);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 24
0
 public static void GetCanonicalFormat(string inClipID, byte[] outClipID)
 {
     SDK.FPClip_GetCanonicalFormat(inClipID, outClipID);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 25
0
 public static FPLong GetPeriod(FPRetentionClassRef inClassRef)
 {
     var retval = SDK.FPRetentionClass_GetPeriod(inClassRef);
     SDK.CheckAndThrowError();
     return retval;
 }
Exemplo n.º 26
0
 public static void GetStringFormat(byte[] inClipID, StringBuilder outClipID)
 {
     SDK.FPClip_GetStringFormat(inClipID, outClipID);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 27
0
 public static void Close(FPQueryResultRef inQueryResultRef)
 {
     SDK.FPQueryResult_Close(inQueryResultRef);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 28
0
 public static void SetRetentionHold(FPClipRef inClip, FPBool inHoldFlag, string inHoldID)
 {
     SDK.FPClip_SetRetentionHold8(inClip, inHoldFlag, inHoldID);
     SDK.CheckAndThrowError();
 }
Exemplo n.º 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();
 }
Exemplo n.º 30
0
 public static void GetEBREventTime(FPClipRef inClip, StringBuilder outEBREventTime, ref FPInt ioEBREventTimeLen)
 {
     SDK.FPClip_GetEBREventTime8(inClip, outEBREventTime, ref ioEBREventTimeLen);
     SDK.CheckAndThrowError();
 }