S2OPC OPCUA Toolkit
libs2opc_client_config.h
Go to the documentation of this file.
1 /*
2  * Licensed to Systerel under one or more contributor license
3  * agreements. See the NOTICE file distributed with this work
4  * for additional information regarding copyright ownership.
5  * Systerel licenses this file to you under the Apache
6  * License, Version 2.0 (the "License"); you may not use this
7  * file except in compliance with the License. You may obtain
8  * a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  */
19 
26 #ifndef LIBS2OPC_CLIENT_CONFIG_H_
27 #define LIBS2OPC_CLIENT_CONFIG_H_
28 
29 #include <stdbool.h>
30 #include "sopc_enums.h"
31 #include "sopc_user_app_itf.h"
46 
52 
59 
79  SOPC_ConfigClientXML_Custom* customConfig,
80  size_t* nbScConfigs,
81  SOPC_SecureConnection_Config*** scConfigArray);
82 
96 
107 
133 typedef void SOPC_ServiceAsyncResp_Fct(SOPC_EncodeableType* type, const void* response, uintptr_t userContext);
134 
151 
167  char** outUserName,
168  char** outPassword);
169 
182  SOPC_GetClientUserNamePassword_Fct* getClientUsernamePassword);
183 
199  const char* userCertThumb,
200  char** outPassword);
201 
214  SOPC_GetClientUserKeyPassword_Fct* getClientX509userKeyPassword);
215 
228 typedef bool SOPC_GetPassword_Fct(char** outPassword);
229 
243 
244 #endif /* LIBS2OPC_CLIENT_CONFIG_H_ */
SOPC_ClientConfigHelper_GetUserIdFromConfig
const char * SOPC_ClientConfigHelper_GetUserIdFromConfig(const SOPC_SecureConnection_Config *secConnConfig)
Returns the user defined identifier attached to a secure connection configuration....
SOPC_ServiceAsyncResp_Fct
void SOPC_ServiceAsyncResp_Fct(SOPC_EncodeableType *type, const void *response, uintptr_t userContext)
Type of callback to provide asynchronous service response.
Definition: libs2opc_client_config.h:133
SOPC_GetPassword_Fct
bool SOPC_GetPassword_Fct(char **outPassword)
Type of callback to retrieve password for decryption of the client application private key or the use...
Definition: libs2opc_client_config.h:228
SOPC_ClientConfigHelper_ConfigureFromXML
SOPC_ReturnStatus SOPC_ClientConfigHelper_ConfigureFromXML(const char *clientConfigPath, SOPC_ConfigClientXML_Custom *customConfig, size_t *nbScConfigs, SOPC_SecureConnection_Config ***scConfigArray)
Configure client from XML configuration files for: client connections.
SOPC_ClientConfigHelper_SetUserKeyPasswordCallback
SOPC_ReturnStatus SOPC_ClientConfigHelper_SetUserKeyPasswordCallback(SOPC_GetClientUserKeyPassword_Fct *getClientX509userKeyPassword)
Defines the callback to retrieve password for decryption of the user X509 token private key.
SOPC_GetClientUserNamePassword_Fct
bool SOPC_GetClientUserNamePassword_Fct(const SOPC_SecureConnection_Config *secConnConfig, char **outUserName, char **outPassword)
Type of callback to retrieve username and password for session activation.
Definition: libs2opc_client_config.h:166
sopc_enums.h
SOPC_ClientConfigHelper_SetClientKeyPasswordCallback
SOPC_ReturnStatus SOPC_ClientConfigHelper_SetClientKeyPasswordCallback(SOPC_GetPassword_Fct *getClientKeyPassword)
Defines the callback to retrieve password for decryption of the client private key.
SOPC_GetClientUserKeyPassword_Fct
bool SOPC_GetClientUserKeyPassword_Fct(const SOPC_SecureConnection_Config *secConnConfig, const char *userCertThumb, char **outPassword)
Type of callback to retrieve password for decryption of the user private key.
Definition: libs2opc_client_config.h:198
SOPC_ClientConfigHelper_Clear
void SOPC_ClientConfigHelper_Clear(void)
Clear the S2OPC client frontend configuration It shall be done before a call to SOPC_CommonHelper_Cle...
SOPC_ConfigClientXML_Custom
struct SOPC_ConfigClientXML_Custom SOPC_ConfigClientXML_Custom
Structure reserved for future use in order to customize the configuration through XML....
Definition: libs2opc_client_config.h:58
SOPC_ClientConfigHelper_GetConfigFromId
SOPC_SecureConnection_Config * SOPC_ClientConfigHelper_GetConfigFromId(const char *userDefinedId)
Returns the secure connection configuration which has the given user defined identifier....
sopc_user_app_itf.h
Contains the types to be used by the user application to use the Toolkit.
SOPC_ClientConfigHelper_SetUserNamePasswordCallback
SOPC_ReturnStatus SOPC_ClientConfigHelper_SetUserNamePasswordCallback(SOPC_GetClientUserNamePassword_Fct *getClientUsernamePassword)
Defines the callback to retrieve the username and password to activate the client session....
SOPC_SecureConnection_Config
Structure representing a secure connection configuration (secure channel + session) which allow to es...
Definition: sopc_user_app_itf.h:214
SOPC_ClientConfigHelper_Initialize
SOPC_ReturnStatus SOPC_ClientConfigHelper_Initialize(void)
Initialize the S2OPC client frontend configuration Call to SOPC_ClientConfigHelper_Initialize is requ...
SOPC_EncodeableType_Struct
Encodeable object type structure definition. It provides all the services functions associated with t...
Definition: sopc_encodeabletype.h:161
SOPC_ClientConfigHelper_SetServiceAsyncResponse
SOPC_ReturnStatus SOPC_ClientConfigHelper_SetServiceAsyncResponse(SOPC_ServiceAsyncResp_Fct *asyncRespCb)
Define the service response callback to be used.
SOPC_ReturnStatus
SOPC_ReturnStatus
Definition: libs2opc_client.h:64