Revert "Revert "Fix intApp TC failure""
[platform/framework/native/appfw.git] / inc / FSecCertX509CertificateStore.h
index 8207122..e88fc93 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -37,7 +36,7 @@ class _CertMgrSvcProxy;
 
 /**
  *     @class  X509CertificateStore
- *     @brief  This class is used for retrieving and managing certificates from a repository.
+ *     @brief  This class provides methods for retrieving and managing certificates from a repository.
  *
  *     @since  2.0
  *
@@ -87,18 +86,19 @@ public:
         *      @privilege              %http://tizen.org/privilege/certificate.read
         *
         *      @return                 An error code
-        *      @param[in]              selector                        A selector that defines a set of criterion for selecting certificates
+        *      @param[in]              selector                        The selector that defines a set of criterion for selecting certificates
         *      @exception              E_SUCCESS                       The method is successful.
         *      @exception              E_OUT_OF_MEMORY         The memory is insufficient.
-        *      @exception              E_SYSTEM                        A system error has occurred. @n
-        *                                                                              The IPC operation has failed.
+        *      @exception              E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                                              - A system error has occurred.
+        *                                                                              - The IPC operation has failed.
         *      @exception              E_INVALID_ARG           The specified @c selector is invalid.
         *      @exception              E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
         */
        virtual result SetCertificateSelector(const Tizen::Security::Cert::ICertificateSelector& selector);
 
        /**
-        *      Gets a count of certificates that match the specified selector.
+        *      Gets the count of certificates that match the specified selector.
         *
         *      @since                  2.0
         *
@@ -113,19 +113,20 @@ public:
        virtual result GetCertificateCount(int& count) const;
 
        /**
-        *      Gets each certificate that matches the specified selector.
+        *      Gets the certificate that matches the specified selector.
         *
         *      @since                  2.0
         *
         *      @privlevel              partner
         *      @privilege              %http://tizen.org/privilege/certificate.read
         *
-        *      @return                 The certificates that matches the specified selector
+        *      @return                 The certificate that matches the specified selector
         *      @exception              E_SUCCESS                       The method is successful.
         *      @exception              E_OUT_OF_MEMORY         The memory is insufficient.
         *      @exception              E_OBJ_NOT_FOUND         The certificate is not found.
-        *      @exception              E_SYSTEM                        A system error has occurred. @n
-        *                                                                              The Tizen::Base::ByteBuffer operation has failed.
+        *      @exception              E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                                              - A system error has occurred.
+        *                                                                              - The Tizen::Base::ByteBuffer operation has failed.
         *      @exception              E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
         */
        virtual Tizen::Security::Cert::ICertificate* GetNextCertificateN(void) const;
@@ -139,20 +140,22 @@ public:
         *      @privilege              %http://tizen.org/privilege/certificate.write
         *
         *      @return                 An error code
-        *      @param[in]              certificateType         The type of the Certificate (ROOT_CA, OPERATOR_DOMAIN, or TRUSTED_THIRD_PARTY_DOMAIN)
+        *      @param[in]              certificateType         The type of the Certificate (@c ROOT_CA, @c OPERATOR_DOMAIN, or @c TRUSTED_THIRD_PARTY_DOMAIN)
         *      @param[in]              certificate                     A reference to the certificate to insert
         *      @exception              E_SUCCESS                       The method is successful.
         *      @exception              E_OUT_OF_MEMORY         The memory is insufficient.
-        *      @exception              E_INVALID_ARG           The specified @c certificate or the certificate data is invalid, or
-        *                                                                              the specified @c certificateType is invalid.
-        *      @exception              E_SYSTEM                        A system error has occurred. @n
-        *                                      Either the IPC operation or the file operation or the DB operation has failed.
+        *      @exception              E_INVALID_ARG           Either of the following conditions has occurred:
+        *                                                                              - The specified @c certificate or the certificate data is invalid.
+        *                                                                              - The specified @c certificateType is invalid.
+        *      @exception              E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                                              - A system error has occurred.
+        *                                                                              - Either the IPC operation or the file operation or the DB operation has failed.
         *      @exception              E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
         */
        virtual result Insert(CertificateType certificateType, const Tizen::Security::Cert::ICertificate& certificate);
 
        /**
-        *  Updates the certificate in the certificate store.
+        *      Updates the certificate in the certificate store.
         *
         *      @since                  2.0
         *
@@ -160,22 +163,24 @@ public:
         *      @privilege              %http://tizen.org/privilege/certificate.write
         *
         *      @return                 An error code
-        *      @param[in]              certificateType         The type of the Certificate (ROOT_CA, OPERATOR_DOMAIN, or TRUSTED_THIRD_PARTY_DOMAIN)
+        *      @param[in]              certificateType         The type of the Certificate (@c ROOT_CA, @c OPERATOR_DOMAIN, or @c TRUSTED_THIRD_PARTY_DOMAIN)
         *      @param[in]              oldCert                         A reference to the old certificate
         *      @param[in]              newCert                         A reference to the new certificate
         *      @exception              E_SUCCESS                       The method is successful.
         *      @exception              E_OUT_OF_MEMORY         The memory is insufficient.
-        *      @exception              E_INVALID_ARG           The specified @c certificate or the certificate data is invalid, or
-        *                                                                              the specified @c certificateType is invalid.
+        *      @exception              E_INVALID_ARG           Either of the following conditions has occurred:
+        *                                                                              - The specified @c certificate or the certificate data is invalid.
+        *                                                                              - The specified @c certificateType is invalid.
         *      @exception              E_OBJ_NOT_FOUND         The certificate is not found.
-        *      @exception              E_SYSTEM                        A system error has occurred. @n
-        *                                      Either the IPC operation or the file operation or the DB operation has failed.
+        *      @exception              E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                                              - A system error has occurred.
+        *                                                                              - Either the IPC operation or the file operation or the DB operation has failed.
         *      @exception              E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
         */
        virtual result Update(CertificateType certificateType, const Tizen::Security::Cert::ICertificate& oldCert, const Tizen::Security::Cert::ICertificate& newCert);
 
        /**
-        *  Removes the certificate from the certificate store.
+        *      Removes the certificate from the certificate store.
         *
         *      @since                  2.0
         *
@@ -183,15 +188,17 @@ public:
         *      @privilege              %http://tizen.org/privilege/certificate.write
         *
         *      @return                 An error code
-        *      @param[in]              certificateType         The type of the Certificate (ROOT_CA, OPERATOR_DOMAIN, TRUSTED_THIRD_PARTY_DOMAIN)
+        *      @param[in]              certificateType         The type of the Certificate (@c ROOT_CA, @c OPERATOR_DOMAIN, @c TRUSTED_THIRD_PARTY_DOMAIN)
         *      @param[in]              certificate                     A reference to the certificate to remove
         *      @exception              E_SUCCESS                       The method is successful.
         *      @exception              E_OUT_OF_MEMORY         The memory is insufficient.
-        *      @exception              E_INVALID_ARG           The specified @c certificate or the certificate data is invalid, or
-        *                                                                              the specified @c certificateType is invalid.
+        *      @exception              E_INVALID_ARG           Either of the following conditions has occurred:
+        *                                                                              - The specified @c certificate or the certificate data is invalid.
+        *                                                                              - The specified @c certificateType is invalid.
         *      @exception              E_OBJ_NOT_FOUND         The certificate is not found.
-        *      @exception              E_SYSTEM                        A system error has occurred. @n
-        *                                      Either the IPC operation or the file operation or the DB operation has failed.
+        *      @exception              E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                                              - A system error has occurred.
+        *                                                                              - Either the IPC operation or the file operation or the DB operation has failed.
         *      @exception              E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
         */
        virtual result Remove(CertificateType certificateType, const Tizen::Security::Cert::ICertificate& certificate);
@@ -205,11 +212,12 @@ public:
         *      @privilege              %http://tizen.org/privilege/certificate.write
         *
         *      @return                 An error code
-        *  @param[in]          filePath                        The file path of PKCS 12 certificate to insert
-        *  @param[in]          password                        The password string to decrypt PKCS 12 certificate
+        *      @param[in]              filePath                        The file path of PKCS 12 certificate to insert
+        *      @param[in]              password                        The password string to decrypt PKCS 12 certificate
         *      @exception              E_SUCCESS                       The method is successful.
         *      @exception              E_INVALID_ARG           The specified @c certificate or the certificate data is invalid.
         *      @exception              E_SYSTEM                        The method cannot proceed due to a severe system error.
+        *      @exception              E_DATA_NOT_FOUND        A root CA certificate does not exist.
         *      @exception              E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
         */
        result InsertPkcs12(const Tizen::Base::String& filePath, const Tizen::Base::String& password);