package CRSDK;

@SuppressWarnings("unused")
public class CrDefines {
    public static final int CrChanged = 0x0001;
    public static final CrInt32 CrSETSAVEINFO_AUTO_NUMBER = new CrInt32(-1);
    public static final CrInt32u USB_SERIAL_LENGTH = new CrInt32u(12);
    public static final CrInt32u CrFTPTRANSFERSETTING_SAVEREAD_PASSWORD_MAX = new CrInt32u(33); // 32 + 1 for null terminator
    public static final CrInt32u CrREMOTETRANSFER_PARTIAL_FILE_SIZE_MIN  = new CrInt32u(1); // 1 byte
    public static final CrInt32u CrREMOTETRANSFER_PARTIAL_FILE_SIZE_MAX  = new CrInt32u(0x7FFFFFFF); // 2GB-1

    public static final CrInt8u CrShutterSlowFrames_Disable = new CrInt8u(0x00);
    public static final CrInt32u CrShutterAngle_Disable = new CrInt32u(0x00000000);
    public static final CrInt32u CrFocalDistance_Infinity = new CrInt32u(0xFFFFFFFFL);
    public static final CrInt32u CrBatteryRemainingInMinutes_Untaken = new CrInt32u(0xFFFFFFFFL);
    public static final CrInt32u CrBatteryRemainingInVoltage_Untaken = new CrInt32u (0xFFFFFFFFL);
    public static final CrInt32u CrDCVoltage_Untaken = new CrInt32u(0xFFFFFFFFL);
    public static final String CrLensVersionNumber_Untaken = "--";
    public static final CrInt16u CrBatteryRemain_Untaken = new CrInt16u(0xFFFF);

    public static boolean CR_SUCCEEDED(int value){
        return value == CrError.CrError_None.getValue();
    }

    public static boolean CR_FAILED(int value){
        return value != CrError.CrError_None.getValue();
    }

    public static class CrDeviceHandle extends CrInt64{
        public CrDeviceHandle(long value) {
            super(value);
        }
    }
    public static class CrDeviceFeature extends CrInt64{
        public CrDeviceFeature(long value) {
            super(value);
        }
    }
    public static class CrImageID extends CrInt32u{
        public CrImageID(int value) {
            super(value);
        }
    }
    public static class CrImageType extends CrInt32u{
        public CrImageType(int value) {
            super(value);
        }
    }
    public static class CrFolderHandle extends CrInt32u{
        public CrFolderHandle(int value) {
            super(value);
        }
    }
    public static class CrContentHandle extends CrInt32u{
        public CrContentHandle(int value) {
            super(value);
        }
    }
}
