/// <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); } }
public static void GetName(FPClipRef inClip, ref byte[] outName, ref FPInt ioNameLen) { SDK.FPClip_GetName8(inClip, outName, ref ioNameLen); SDK.CheckAndThrowError(); }
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(); }
public static void AuditedDelete(FPPoolRef inPool, string inClipID, string inReason, FPLong inOptions) { SDK.FPClip_AuditedDelete8(inPool, inClipID, inReason, inOptions); SDK.CheckAndThrowError(); }
public static void TriggerEBREventWithClass(FPClipRef inClip, FPRetentionClassRef inClass) { SDK.FPClip_TriggerEBREventWithClass(inClip, inClass); SDK.CheckAndThrowError(); }
public static void TriggerEBREvent(FPClipRef inClip) { SDK.FPClip_TriggerEBREvent(inClip); SDK.CheckAndThrowError(); }
public static void GetDescriptionAttribute(FPClipRef inClip, string inAttrName, ref byte[] outAttrValue, ref FPInt ioAttrValueLen) { SDK.FPClip_GetDescriptionAttribute8(inClip, inAttrName, outAttrValue, ref ioAttrValueLen); SDK.CheckAndThrowError(); }
public static void RemoveDescriptionAttribute(FPClipRef inClip, string inAttrName) { SDK.FPClip_RemoveDescriptionAttribute8(inClip, inAttrName); SDK.CheckAndThrowError(); }
public static void SetDescriptionAttribute(FPClipRef inClip, string inAttrName, string inAttrValue) { SDK.FPClip_SetDescriptionAttribute8(inClip, inAttrName, inAttrValue); SDK.CheckAndThrowError(); }
public static void RawRead(FPClipRef inClip, FPStreamRef inStream) { SDK.FPClip_RawRead(inClip, inStream); SDK.CheckAndThrowError(); }
public static void Write(FPClipRef inClip, StringBuilder outClipID) { SDK.FPClip_Write(inClip, outClipID); SDK.CheckAndThrowError(); }
public static void SetRetentionPeriod(FPClipRef inClip, FPLong inRetentionSecs) { SDK.FPClip_SetRetentionPeriod(inClip, inRetentionSecs); SDK.CheckAndThrowError(); }
public static void GetCreationDate(FPClipRef inClip, StringBuilder outDate, ref FPInt ioDateLen) { SDK.FPClip_GetCreationDate8(inClip, outDate, ref ioDateLen); SDK.CheckAndThrowError(); }
public static void EnableEBRWithPeriod(FPClipRef inClip, FPLong inSeconds) { SDK.FPClip_EnableEBRWithPeriod(inClip, inSeconds); SDK.CheckAndThrowError(); }
public static void EnableEBRWithClass(FPClipRef inClip, FPRetentionClassRef inClass) { SDK.FPClip_EnableEBRWithClass(inClip, inClass); SDK.CheckAndThrowError(); }
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(); }
public static void TriggerEBREventWithPeriod(FPClipRef inClip, FPLong inSeconds) { SDK.FPClip_TriggerEBREventWithPeriod(inClip, inSeconds); SDK.CheckAndThrowError(); }
public static void SetRetentionClass(FPClipRef inClipRef, FPRetentionClassRef inClassRef) { SDK.FPClip_SetRetentionClass(inClipRef, inClassRef); SDK.CheckAndThrowError(); }
public static void Close(FPClipRef inClip) { SDK.FPClip_Close(inClip); SDK.CheckAndThrowError(); }
public static void RemoveRetentionClass(FPClipRef inClipRef) { SDK.FPClip_RemoveRetentionClass(inClipRef); SDK.CheckAndThrowError(); }
public static void Purge(FPPoolRef inPool, string inClipID) { SDK.FPClip_Purge(inPool, inClipID); SDK.CheckAndThrowError(); }
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; }
public static void GetStringFormat(byte[] inClipID, StringBuilder outClipID) { SDK.FPClip_GetStringFormat(inClipID, outClipID); SDK.CheckAndThrowError(); }
public static void Close(FPQueryResultRef inQueryResultRef) { SDK.FPQueryResult_Close(inQueryResultRef); SDK.CheckAndThrowError(); }
public static void SetRetentionHold(FPClipRef inClip, FPBool inHoldFlag, string inHoldID) { SDK.FPClip_SetRetentionHold8(inClip, inHoldFlag, inHoldID); SDK.CheckAndThrowError(); }
public static void GetField(FPQueryResultRef inQueryResultRef, string inAttrName, ref byte[] outAttrValue, ref FPInt ioAttrValueLen) { SDK.FPQueryResult_GetField8(inQueryResultRef, inAttrName, outAttrValue, ref ioAttrValueLen); SDK.CheckAndThrowError(); }
public static void GetEBREventTime(FPClipRef inClip, StringBuilder outEBREventTime, ref FPInt ioEBREventTimeLen) { SDK.FPClip_GetEBREventTime8(inClip, outEBREventTime, ref ioEBREventTimeLen); SDK.CheckAndThrowError(); }