williamr@2: #ifndef __CERTAPP_API_H__ williamr@2: #define __CERTAPP_API_H__/* williamr@2: * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * under the terms of the License "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: williamr@2: #ifdef __cplusplus williamr@2: extern "C" { williamr@2: #endif williamr@2: /** williamr@2: RunCertApp williamr@2: williamr@2: This API will run certapp as separate process and returns the williamr@2: result. This approach is taken so that the caller is protected from williamr@2: any possible certapp failure. Even if certapp crashes, RunCertApp will williamr@2: return without crashing the caller. williamr@2: williamr@2: Certapp guarantees to return a non-zero status if it fails, which williamr@2: means you don't need to parse its output to deduce if it worked or williamr@2: not. williamr@2: williamr@2: The certapp executable must be in the current search path. williamr@2: williamr@2: The caller will be blocked whilst certapp runs. williamr@2: williamr@2: There are two logging arguments, aProgress and aErrors. These may be williamr@2: set to either a filename to write the output to or to "-" which means williamr@2: standard output. If both logging arguments are identical, then the williamr@2: output will be merged to a single location. williamr@2: williamr@2: Progress and warning messages are written to aProgress. williamr@2: williamr@2: Fatal errors will be logged to aErrors, and RunCertApp will return a williamr@2: non-zero number. An error code of -1 means the certapp executable williamr@2: failed or was not found, other error codes indicate problems launching williamr@2: the executable. williamr@2: williamr@2: The argc argument should be set to the count of the argv arguments. williamr@2: williamr@2: The argv argument should be set to an array of const char * ptrs to williamr@2: the remaining arguments. williamr@2: williamr@2: The argv arguments maybe any of the arguments accepted by the certapp williamr@2: executable, run "certapp -h" for further information. williamr@2: */ williamr@2: int RunCertApp(const char *aProgress, const char *aErrors, williamr@2: int argc, char **argv); williamr@2: williamr@2: #ifdef __cplusplus williamr@2: } williamr@2: #endif williamr@2: williamr@2: #endif