testexecmgmt/ucc/BuildTools/cleantree/cleantree.h
changeset 0 3da2a79470a7
equal deleted inserted replaced
-1:000000000000 0:3da2a79470a7
       
     1 /*
       
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __SYNCTREE_H__
       
    21 #define __SYNCTREE_H__
       
    22 
       
    23 /*******************************************************************************
       
    24  *
       
    25  * System Includes
       
    26  *
       
    27  ******************************************************************************/
       
    28 #include <time.h>
       
    29 
       
    30 
       
    31 /*******************************************************************************
       
    32  *
       
    33  * Definitions
       
    34  *
       
    35  ******************************************************************************/
       
    36 #define ERR_OPENFILEFAILED		-100
       
    37 #define ERR_RECVFAILED			-101
       
    38 #define ERR_SENDHEADERFAILED	-102
       
    39 #define ERR_SENDFILENAMEFAILED	-103
       
    40 #define ERR_FILEREJECTED		-104
       
    41 #define ERR_CREATESOCKETFAILED	-105
       
    42 #define ERR_STATFAILED			-106
       
    43 #define ERR_RECEIVEHEADERFAILED	-107
       
    44 #define ERR_SENDFAILED			-108
       
    45 #define ERR_OPENPORTFAILED		-109
       
    46 
       
    47 /*******************************************************************************
       
    48  *
       
    49  * Types
       
    50  *
       
    51  ******************************************************************************/
       
    52 typedef enum {
       
    53 	FTC_REQUESTSEND = 1,
       
    54 	FTC_ALLOWSEND = 2,
       
    55 	FTC_REJECTSEND = 3,
       
    56 	FTC_EXECUTESCRIPT = 4
       
    57 } TFileTransferCommand;
       
    58 
       
    59 typedef struct {
       
    60 	TFileTransferCommand iCommand;
       
    61 	int iFileLength;
       
    62 	time_t iTimeLastModified;
       
    63 	int iFilenameLength;
       
    64 } TFileTransferHeader;
       
    65 
       
    66 
       
    67 /*******************************************************************************
       
    68  *
       
    69  * SyncFile
       
    70  *
       
    71  ******************************************************************************/
       
    72 int SyncFile( char *portname, char *filename, int *errcode );
       
    73 int RecvSyncFile( char *portname, int *errcode );
       
    74 int RunScript( char *portname, char *filename, int *errcode );
       
    75 
       
    76 #endif //__SYNCTREE_H__