securityanddataprivacytools/securitytools/certapp/api/certapp-api.h
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 #ifndef __CERTAPP_API_H__
       
     2 #define __CERTAPP_API_H__/*
       
     3 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 * All rights reserved.
       
     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".
       
     9 *
       
    10 * Initial Contributors:
       
    11 * Nokia Corporation - initial contribution.
       
    12 *
       
    13 * Contributors:
       
    14 *
       
    15 * Description: 
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @file
       
    24  @publishedAll
       
    25  @released
       
    26 */
       
    27 
       
    28 #ifdef  __cplusplus
       
    29 extern "C" {
       
    30 #endif
       
    31 /**
       
    32    RunCertApp
       
    33 
       
    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. 
       
    38  
       
    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 
       
    41 not. 
       
    42  
       
    43 The certapp executable must be in the current search path. 
       
    44  
       
    45 The caller will be blocked whilst certapp runs. 
       
    46  
       
    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. 
       
    51  
       
    52 Progress and warning messages are written to aProgress. 
       
    53  
       
    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
       
    57 the executable.
       
    58  
       
    59 The argc argument should be set to the count of the argv arguments. 
       
    60  
       
    61 The argv argument should be set to an array of const char * ptrs to 
       
    62 the remaining arguments. 
       
    63  
       
    64 The argv arguments maybe any of the arguments accepted by the certapp 
       
    65 executable, run "certapp -h" for further information. 
       
    66 */
       
    67 int RunCertApp(const char *aProgress, const char *aErrors,
       
    68 			   int argc, char **argv);
       
    69 
       
    70 #ifdef  __cplusplus
       
    71 }
       
    72 #endif
       
    73 
       
    74 #endif