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 
57 
64 
84  SOPC_ConfigClientXML_Custom* customConfig,
85  size_t* nbScConfigs,
86  SOPC_SecureConnection_Config*** scConfigArray);
87 
101 
112 
138 typedef void SOPC_ServiceAsyncResp_Fct(SOPC_EncodeableType* type, const void* response, uintptr_t userContext);
139 
156 
172  char** outUserName,
173  char** outPassword);
174 
187  SOPC_GetClientUserNamePassword_Fct* getClientUsernamePassword);
188 
204  const char* userCertThumb,
205  char** outPassword);
206 
219  SOPC_GetClientUserKeyPassword_Fct* getClientX509userKeyPassword);
220 
233 typedef bool SOPC_GetPassword_Fct(char** outPassword);
234 
248 
249 #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:138
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:233
SOPC_ClientConfigHelper_ConfigureFromXML
SOPC_ReturnStatus SOPC_ClientConfigHelper_ConfigureFromXML(const char *clientConfigPath, SOPC_ConfigClientXML_Custom *customConfig, size_t *nbScConfigs, SOPC_SecureConnection_Config ***scConfigArray)
Configures 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:171
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:203
SOPC_ClientConfigHelper_Clear
void SOPC_ClientConfigHelper_Clear(void)
Clears the S2OPC client frontend configuration It shall be done before a call to SOPC_CommonHelper_Cl...
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:63
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:216
SOPC_ClientConfigHelper_Initialize
SOPC_ReturnStatus SOPC_ClientConfigHelper_Initialize(void)
Initializes the S2OPC client frontend configuration Call to SOPC_ClientConfigHelper_Initialize is req...
SOPC_EncodeableType_Struct
Encodeable object type structure definition. It provides all the services functions associated with t...
Definition: sopc_encodeabletype.h:164
SOPC_ClientConfigHelper_SetServiceAsyncResponse
SOPC_ReturnStatus SOPC_ClientConfigHelper_SetServiceAsyncResponse(SOPC_ServiceAsyncResp_Fct *asyncRespCb)
Defines the service response callback to be used.
SOPC_ReturnStatus
SOPC_ReturnStatus
Definition: libs2opc_client.h:64