epoc32/include/tools/certapp-api.h
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/tools/certapp-api.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,74 @@
     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 +
    1.25 +/**
    1.26 + @file
    1.27 + @publishedAll
    1.28 + @released
    1.29 +*/
    1.30 +
    1.31 +#ifdef  __cplusplus
    1.32 +extern "C" {
    1.33 +#endif
    1.34 +/**
    1.35 +   RunCertApp
    1.36 +
    1.37 +This API will run certapp as separate process and returns the 
    1.38 +result. This approach is taken so that the caller is protected from 
    1.39 +any possible certapp failure. Even if certapp crashes, RunCertApp will 
    1.40 +return without crashing the caller. 
    1.41 + 
    1.42 +Certapp guarantees to return a non-zero status if it fails, which 
    1.43 +means you don't need to parse its output to deduce if it worked or 
    1.44 +not. 
    1.45 + 
    1.46 +The certapp executable must be in the current search path. 
    1.47 + 
    1.48 +The caller will be blocked whilst certapp runs. 
    1.49 + 
    1.50 +There are two logging arguments, aProgress and aErrors. These may be 
    1.51 +set to either a filename to write the output to or to "-" which means 
    1.52 +standard output. If both logging arguments are identical, then the 
    1.53 +output will be merged to a single location. 
    1.54 + 
    1.55 +Progress and warning messages are written to aProgress. 
    1.56 + 
    1.57 +Fatal errors will be logged to aErrors, and RunCertApp will return a
    1.58 +non-zero number. An error code of -1 means the certapp executable
    1.59 +failed or was not found, other error codes indicate problems launching
    1.60 +the executable.
    1.61 + 
    1.62 +The argc argument should be set to the count of the argv arguments. 
    1.63 + 
    1.64 +The argv argument should be set to an array of const char * ptrs to 
    1.65 +the remaining arguments. 
    1.66 + 
    1.67 +The argv arguments maybe any of the arguments accepted by the certapp 
    1.68 +executable, run "certapp -h" for further information. 
    1.69 +*/
    1.70 +int RunCertApp(const char *aProgress, const char *aErrors,
    1.71 +			   int argc, char **argv);
    1.72 +
    1.73 +#ifdef  __cplusplus
    1.74 +}
    1.75 +#endif
    1.76 +
    1.77 +#endif