 
 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

    /**
     initlaize bar code reader view with the specified decoder. this is for IB
     
     @param coder: NSCoder instance to decode the view.
     
     @return a new instance of bar code reader view.
     */
    required public init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        self.setupInitializers()
    }
        
    public override func didMoveToSuperview() {
        super.didMoveToSuperview()
        self.barcodeWillMoveToSuperView()
    }
    
    //MARK: - public functions
    public func startCapturing() {
        if nil != self.captureSession{
            self.captureSession.startRunning()
        }
    }
    
    public func stopCapturing() {
        if nil != self.captureSession{
            self.captureSession.stopRunning()

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