Add NOTICE, AUTHOR file and modify boilerplate
[platform/core/connectivity/smartcard-service.git] / server / ClientInstance.cpp
index 779883b..0dc84c4 100644 (file)
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
+* Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 
 namespace smartcard_service_api
 {
+#if 1
+       gboolean ClientInstance::_getCertificationHashes(gpointer user_data)
+       {
+               gboolean result = false;
+               ClientInstance *instance = (ClientInstance *)user_data;
+
+               SignatureHelper::getCertificationHashes(instance->getPID(), instance->certHashes);
+
+               return result;
+       }
+#endif
+
        void ClientInstance::setPID(int pid)
        {
                this->pid = pid;
@@ -115,4 +127,12 @@ namespace smartcard_service_api
                return result;
        }
 
+       void ClientInstance::generateCertificationHashes()
+       {
+#if 1
+               g_idle_add(_getCertificationHashes, (gpointer)this);
+#else
+               SignatureHelper::getCertificationHashes(getPID(), certHashes);
+#endif
+       }
 } /* namespace smartcard_service_api */