1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/securityanddataprivacytools/securitytools/certapp/api/certapp-api.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,72 @@
1.4 +#ifndef __CERTAPP_API_H__
1.5 +#define __CERTAPP_API_H__/*
1.6 +* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Eclipse Public License v1.0"
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description:
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +/**
1.24 + @file
1.25 + @publishedAll
1.26 + @released
1.27 +*/
1.28 +
1.29 +#ifdef __cplusplus
1.30 +extern "C" {
1.31 +#endif
1.32 +/**
1.33 + RunCertApp
1.34 +
1.35 +This API will run certapp as separate process and returns the
1.36 +result. This approach is taken so that the caller is protected from
1.37 +any possible certapp failure. Even if certapp crashes, RunCertApp will
1.38 +return without crashing the caller.
1.39 +
1.40 +Certapp guarantees to return a non-zero status if it fails, which
1.41 +means you don't need to parse its output to deduce if it worked or
1.42 +not.
1.43 +
1.44 +The certapp executable must be in the current search path.
1.45 +
1.46 +The caller will be blocked whilst certapp runs.
1.47 +
1.48 +There are two logging arguments, aProgress and aErrors. These may be
1.49 +set to either a filename to write the output to or to "-" which means
1.50 +standard output. If both logging arguments are identical, then the
1.51 +output will be merged to a single location.
1.52 +
1.53 +Progress and warning messages are written to aProgress.
1.54 +
1.55 +Fatal errors will be logged to aErrors, and RunCertApp will return a
1.56 +non-zero number. An error code of -1 means the certapp executable
1.57 +failed or was not found, other error codes indicate problems launching
1.58 +the executable.
1.59 +
1.60 +The argc argument should be set to the count of the argv arguments.
1.61 +
1.62 +The argv argument should be set to an array of const char * ptrs to
1.63 +the remaining arguments.
1.64 +
1.65 +The argv arguments maybe any of the arguments accepted by the certapp
1.66 +executable, run "certapp -h" for further information.
1.67 +*/
1.68 +int RunCertApp(const char *aProgress, const char *aErrors,
1.69 + int argc, char **argv);
1.70 +
1.71 +#ifdef __cplusplus
1.72 +}
1.73 +#endif
1.74 +
1.75 +#endif