Extend RPC parameters

The RPC model is extended to include parameters for identifying
an RPC interface instance at an endpoint and another for
identifying the parameter encoding.  The interface ID parameter
allows multiple service interfaces to be co-located.  The encoding
parameter allows clients to use different parameter serialization
schemes and to specify the format in each RPC request.

Signed-off-by: julhal01 <julian.hall@arm.com>
Change-Id: I201b3417dc0e9f655113b9931db3494e41f1d74b
diff --git a/components/app/ts-demo/test/ts-demo_tests.cpp b/components/app/ts-demo/test/ts-demo_tests.cpp
index 98ca5a0..6629557 100644
--- a/components/app/ts-demo/test/ts-demo_tests.cpp
+++ b/components/app/ts-demo/test/ts-demo_tests.cpp
@@ -1,29 +1,53 @@
 /*
- * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
 #include <app/ts-demo/ts-demo.h>
-#include <service/crypto/client/test/test_crypto_client.h>
+#include <protocols/rpc/common/packed-c/encoding.h>
 #include <CppUTest/TestHarness.h>
+#include <service_locator.h>
+#include <service/crypto/client/cpp/crypto_client.h>
+
 
 TEST_GROUP(TsDemoTests) {
 
     void setup()
     {
-        m_crypto_client = test_crypto_client::create_default();
-        m_crypto_client->init();
+        struct rpc_caller *caller;
+        int status;
+
+        m_rpc_session_handle = NULL;
+        m_crypto_service_context = NULL;
+        m_crypto_client = NULL;
+
+        service_locator_init();
+
+        m_crypto_service_context = service_locator_query("sn:trustedfirmware.org:crypto:0", &status);
+        CHECK(m_crypto_service_context);
+
+        m_rpc_session_handle = service_context_open(m_crypto_service_context, TS_RPC_ENCODING_PROTOBUF, &caller);
+        CHECK(m_rpc_session_handle);
+
+        m_crypto_client = new crypto_client(caller);
     }
 
     void teardown()
     {
-        m_crypto_client->deinit();
         delete m_crypto_client;
         m_crypto_client = NULL;
+
+        service_context_close(m_crypto_service_context, m_rpc_session_handle);
+        m_rpc_session_handle = NULL;
+
+        service_context_relinquish(m_crypto_service_context);
+        m_crypto_service_context = NULL;
     }
 
-    test_crypto_client *m_crypto_client;
+    rpc_session_handle m_rpc_session_handle;
+    struct service_context *m_crypto_service_context;
+    crypto_client *m_crypto_client;
 };
 
 TEST(TsDemoTests, runTsDemo)