epoc32/include/tools/certapp-api.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
#ifndef __CERTAPP_API_H__
williamr@2
     2
#define __CERTAPP_API_H__/*
williamr@2
     3
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     4
* All rights reserved.
williamr@2
     5
* This component and the accompanying materials are made available
williamr@2
     6
* under the terms of the License "Eclipse Public License v1.0"
williamr@2
     7
* which accompanies this distribution, and is available
williamr@2
     8
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     9
*
williamr@2
    10
* Initial Contributors:
williamr@2
    11
* Nokia Corporation - initial contribution.
williamr@2
    12
*
williamr@2
    13
* Contributors:
williamr@2
    14
*
williamr@2
    15
* Description: 
williamr@2
    16
*
williamr@2
    17
*/
williamr@2
    18
williamr@2
    19
williamr@2
    20
williamr@2
    21
williamr@2
    22
/**
williamr@2
    23
 @file
williamr@2
    24
 @publishedAll
williamr@2
    25
 @released
williamr@2
    26
*/
williamr@2
    27
williamr@2
    28
#ifdef  __cplusplus
williamr@2
    29
extern "C" {
williamr@2
    30
#endif
williamr@2
    31
/**
williamr@2
    32
   RunCertApp
williamr@2
    33
williamr@2
    34
This API will run certapp as separate process and returns the 
williamr@2
    35
result. This approach is taken so that the caller is protected from 
williamr@2
    36
any possible certapp failure. Even if certapp crashes, RunCertApp will 
williamr@2
    37
return without crashing the caller. 
williamr@2
    38
 
williamr@2
    39
Certapp guarantees to return a non-zero status if it fails, which 
williamr@2
    40
means you don't need to parse its output to deduce if it worked or 
williamr@2
    41
not. 
williamr@2
    42
 
williamr@2
    43
The certapp executable must be in the current search path. 
williamr@2
    44
 
williamr@2
    45
The caller will be blocked whilst certapp runs. 
williamr@2
    46
 
williamr@2
    47
There are two logging arguments, aProgress and aErrors. These may be 
williamr@2
    48
set to either a filename to write the output to or to "-" which means 
williamr@2
    49
standard output. If both logging arguments are identical, then the 
williamr@2
    50
output will be merged to a single location. 
williamr@2
    51
 
williamr@2
    52
Progress and warning messages are written to aProgress. 
williamr@2
    53
 
williamr@2
    54
Fatal errors will be logged to aErrors, and RunCertApp will return a
williamr@2
    55
non-zero number. An error code of -1 means the certapp executable
williamr@2
    56
failed or was not found, other error codes indicate problems launching
williamr@2
    57
the executable.
williamr@2
    58
 
williamr@2
    59
The argc argument should be set to the count of the argv arguments. 
williamr@2
    60
 
williamr@2
    61
The argv argument should be set to an array of const char * ptrs to 
williamr@2
    62
the remaining arguments. 
williamr@2
    63
 
williamr@2
    64
The argv arguments maybe any of the arguments accepted by the certapp 
williamr@2
    65
executable, run "certapp -h" for further information. 
williamr@2
    66
*/
williamr@2
    67
int RunCertApp(const char *aProgress, const char *aErrors,
williamr@2
    68
			   int argc, char **argv);
williamr@2
    69
williamr@2
    70
#ifdef  __cplusplus
williamr@2
    71
}
williamr@2
    72
#endif
williamr@2
    73
williamr@2
    74
#endif