[MediaVision] Add APIs for Design QR feature (#5104)
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.Vision / MediaVision / QrConfiguration.cs
index 19b005d..be63fbd 100755 (executable)
@@ -21,9 +21,13 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Represents a QR configuration of <see cref="BarcodeGenerator"/>.
     /// </summary>
-    /// <since_tizen> 3 </since_tizen>
+    /// <since_tizen> 4 </since_tizen>
     public class QrConfiguration
     {
+        private string _embedImagePath;
+        private QrShape _dataShape = QrShape.Rectangular;
+        private QrShape _finderShape = QrShape.Rectangular;
+
         /// <summary>
         /// Initializes a new instance of the <see cref="QrConfiguration"/> class.
         /// </summary>
@@ -45,7 +49,7 @@ namespace Tizen.Multimedia.Vision
         /// var qrConfig = new QrConfiguration(QrMode.Numeric, ErrorCorrectionLevel.Medium, 30);
         /// </code>
         /// </example>
-        /// <since_tizen> 3 </since_tizen>
+        /// <since_tizen> 4 </since_tizen>
         public QrConfiguration(QrMode qrMode, ErrorCorrectionLevel ecc, int version)
         {
             if (version < 1 || version > 40)
@@ -64,19 +68,83 @@ namespace Tizen.Multimedia.Vision
         /// <summary>
         /// Gets the encoding mode for the message.
         /// </summary>
-        /// <since_tizen> 3 </since_tizen>
+        /// <since_tizen> 4 </since_tizen>
         public QrMode Mode { get; }
 
         /// <summary>
         /// Gets the error correction level.
         /// </summary>
-        /// <since_tizen> 3 </since_tizen>
+        /// <since_tizen> 4 </since_tizen>
         public ErrorCorrectionLevel ErrorCorrectionLevel { get; }
 
         /// <summary>
         /// Gets the QR code version.
         /// </summary>
-        /// <since_tizen> 3 </since_tizen>
+        /// <since_tizen> 4 </since_tizen>
         public int Version { get; }
+
+        /// <summary>
+        /// Gets or sets the embed image absolute path of the Design QR code.
+        /// </summary>
+        /// <remarks>
+        /// The mediastorage privilege (http://tizen.org/privilege/mediastorage) is needed if the image path is relevant to media storage.<br/>
+        /// The externalstorage privilege (http://tizen.org/privilege/externalstorage) is needed if the image path is relevant to external storage.
+        /// </remarks>
+        /// <exception cref="ArgumentNullException"><paramref name="value"/> is null.</exception>
+        /// <exception cref="ArgumentException"><paramref name="value"/> is zero-length string.</exception>
+        /// <since_tizen> 11 </since_tizen>
+        public string EmbedImagePath
+        {
+            get
+            {
+                return _embedImagePath;
+            }
+            set
+            {
+                ValidationUtil.ValidateIsNullOrEmpty(value, nameof(value));
+
+                _embedImagePath = value;
+            }
+        }
+
+        /// <summary>
+        /// Gets or sets the data shape of the Design QR code.
+        /// </summary>
+        /// <remarks>The default value is <see cref="QrShape.Rectangular"/>.</remarks>
+        /// <exception cref="ArgumentException"><paramref name="value"/> is not valid.</exception>
+        /// <since_tizen> 11 </since_tizen>
+        public QrShape DataShape
+        {
+            get
+            {
+                return _dataShape;
+            }
+            set
+            {
+                ValidationUtil.ValidateEnum(typeof(QrShape), value, nameof(value));
+
+                _dataShape = value;
+            }
+        }
+
+        /// <summary>
+        /// Gets or sets the finder shape of the Design QR code.
+        /// </summary>
+        /// <remarks>The default value is <see cref="QrShape.Rectangular"/>.</remarks>
+        /// <exception cref="ArgumentException"><paramref name="value"/> is not valid.</exception>
+        /// <since_tizen> 11 </since_tizen>
+        public QrShape FinderShape
+        {
+            get
+            {
+                return _finderShape;
+            }
+            set
+            {
+                ValidationUtil.ValidateEnum(typeof(QrShape), value, nameof(value));
+
+                _finderShape = value;
+            }
+        }
     }
 }