     }
 }
 
+/// a UIView subclass which can reads barcodes. :)
 public class BarcodeReaderView: UIView {
     
     /* public Variables */
+    
+    ///the delegate which must conform to `BarcodeReaderViewDelegate` protocol
     public var delegate: BarcodeReaderViewDelegate?
     
+    /// barcodes type you would like to scan with this instance
     public var barCodeTypes: [BarCodeType]? {
         didSet {
             if nil != self.captureSession {

    private var deviceDoesNotSupportVideo: Bool!
    
    //MARK: - initalizers
    /**
    initlaize bar code reader view with the specified frame.
    
    @param frame: CGRect instance to represent the bar code frame.
    
    @return a new instance of bar code reader view.
    */
    override public init(frame: CGRect) {
        super.init(frame: frame)


private let queueName = "sa.com.elm.AbhserLite.MetadataOutput"

/// The barcode reader view delegates.
public protocol BarcodeReaderViewDelegate {
    
    /**
     This method is called upon a success reading of barcodes.
     
     - Parameters:
        - barcodeReader: The bar code reader view instance which read the barcode.
        - info: the string representations of the barcode.
     */
    func barcodeReader(barcodeReader: BarcodeReaderView, didFinishReadingString info: String)
    
    /**
     This method is called upon a failure.
     
     - Parameters:
        - barcodeReader: The bar code reader view instance which failed.
        - error: NSError which describes the failaure.
            - possible error codes:
                - AccessRestriction: 7000
                - DeviceNotSupported: 7001
                - OutputNotSuppoted: 7002
     */
    func barcodeReader(barcodeReader: BarcodeReaderView, didFailReadingWithError error: NSError)
}

/**
 Barcode types.
 
 - Aztec: AVMetadataObjectTypeAztecCode
 - Code128: AVMetadataObjectTypeCode128Code
 - PDF417Barcode: AVMetadataObjectTypePDF417Code
 - QR: AVMetadataObjectTypeQRCode
 - UPCECode: AVMetadataObjectTypeUPCECode
 - Code39Code: AVMetadataObjectTypeCode39Code
 - Code39Mod43Code: AVMetadataObjectTypeCode39Mod43Code
 - EAN13Code: AVMetadataObjectTypeEAN13Code
 - EAN8Code: AVMetadataObjectTypeEAN8Code
 - Interleaved2of5Code: AVMetadataObjectTypeInterleaved2of5Code
 - ITF14Code: AVMetadataObjectTypeITF14Code
 - DataMatrixCode: AVMetadataObjectTypeDataMatrixCode
 */
public enum BarCodeType: String, CustomStringConvertible {
    case Aztec
    case Code128
