// AUTO GENERATED FILE, DO NOT EDIT!
//
// Generated by ./generate_proto.sh

syntax = "proto3";
option java_package = "de.mintware.barcode_scan";

// protos/android_configuration.proto
message AndroidConfiguration {
    // You can optionally set aspect ratio tolerance level
    // that is used in calculating the optimal Camera preview size.
    // On several Huawei devices you need to set this to 0.5.
    // This parameter is only supported on Android devices.
    double aspectTolerance = 1;
    // Set to true to enable auto focus
    // This parameter is only supported on Android devices.
    bool useAutoFocus = 2;
}
// protos/barcode_format.proto
enum BarcodeFormat {
    unknown = 0;
    aztec = 1;
    code39 = 2;
    code93 = 3;
    ean8 = 4;
    ean13 = 5;
    code128 = 6;
    dataMatrix = 7;
    qr = 8;
    interleaved2of5 = 9;
    upce = 10;
    pdf417 = 11;
}
// protos/configuration.proto
message Configuration {
    // Strings which are displayed to the user
    map<string, string> strings = 1;
    // Restricts the barcode format which should be read
    repeated BarcodeFormat restrictFormat = 2;
    // Index of the camera which should used. -1 uses the default camera
    int32 useCamera = 3;
    // Android specific configuration
    AndroidConfiguration android = 4;
    // Set to true to automatically enable flash on camera start
    bool autoEnableFlash = 5;
}

// protos/scan_result.proto
enum ResultType {
    Barcode = 0;
    Cancelled = 1;
    Error = 2;
}
message ScanResult {
    // Represents the type of the result
    ResultType type = 1;
    // The barcode itself if the result type is barcode.
    // If the result type is error it contains the error message
    string rawContent = 2;
    // The barcode format
    BarcodeFormat format = 3;
    // If the format is unknown, this field holds additional information
    string formatNote = 4;
}

