1 #ifndef __CERTAPP_API_H__
2 #define __CERTAPP_API_H__/*
3 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
5 * This component and the accompanying materials are made available
6 * under the terms of the License "Eclipse Public License v1.0"
7 * which accompanies this distribution, and is available
8 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
10 * Initial Contributors:
11 * Nokia Corporation - initial contribution.
34 This API will run certapp as separate process and returns the
35 result. This approach is taken so that the caller is protected from
36 any possible certapp failure. Even if certapp crashes, RunCertApp will
37 return without crashing the caller.
39 Certapp guarantees to return a non-zero status if it fails, which
40 means you don't need to parse its output to deduce if it worked or
43 The certapp executable must be in the current search path.
45 The caller will be blocked whilst certapp runs.
47 There are two logging arguments, aProgress and aErrors. These may be
48 set to either a filename to write the output to or to "-" which means
49 standard output. If both logging arguments are identical, then the
50 output will be merged to a single location.
52 Progress and warning messages are written to aProgress.
54 Fatal errors will be logged to aErrors, and RunCertApp will return a
55 non-zero number. An error code of -1 means the certapp executable
56 failed or was not found, other error codes indicate problems launching
59 The argc argument should be set to the count of the argv arguments.
61 The argv argument should be set to an array of const char * ptrs to
62 the remaining arguments.
64 The argv arguments maybe any of the arguments accepted by the certapp
65 executable, run "certapp -h" for further information.
67 int RunCertApp(const char *aProgress, const char *aErrors,
68 int argc, char **argv);