Dallas Semiconductor DS80C400 C Libraries Home Page

Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals

tini400_ftpclient.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------
00002  *  Copyright (C) 2003-2004 Dallas Semiconductor Corporation, All Rights Reserved.
00003  * 
00004  *  Permission is hereby granted, free of charge, to any person obtaining a
00005  *  copy of this software and associated documentation files (the "Software"),
00006  *  to deal in the Software without restriction, including without limitation
00007  *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
00008  *  and/or sell copies of the Software, and to permit persons to whom the
00009  *  Software is furnished to do so, subject to the following conditions:
00010  * 
00011  *  The above copyright notice and this permission notice shall be included
00012  *  in all copies or substantial portions of the Software.
00013  * 
00014  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00015  *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00016  *  MERCHANTABILITY,  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00017  *  IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES
00018  *  OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00019  *  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00020  *  OTHER DEALINGS IN THE SOFTWARE.
00021  * 
00022  *  Except as contained in this notice, the name of Dallas Semiconductor
00023  *  shall not be used except as stated in the Dallas Semiconductor
00024  *  Branding Policy.
00025  *  -------------------------------------------------------------------------
00026  *  This file contains function definitions for ftpclient library of the 
00027  *  Dallas Semiconductor 400 processor.  This file is intended for use 
00028  *  with the Keil MicroVision (uVision) C compiler.
00029  *  -------------------------------------------------------------------------
00030  */
00031 
00032 #ifndef __tini400_ftpclient_
00033 #define __tini400_ftpclient_
00034 
00035 #include "rom400_sock.h"
00036 #include "stdio.h"
00037 #include "ftpcodes.h"
00038 #include <string.h>
00039 #include <ctype.h>
00040 
00059 #define FTPCLIENT_VERSION_NUMBER    1
00060 
00063 #define FTPCLIENT_ASCII     0
00064 
00067 #define FTPCLIENT_BINARY    1
00068 
00071 #define FTPCLIENT_PORTNUMBER 21
00072 
00075 #define FTPCLIENT_ACTIVE_MODE 1
00076 
00079 #define FTPCLIENT_PASSIVE_MODE 0
00080 
00083 #define FTPCLIENT_DETAILED_DIRLISTING  1
00084 
00087 #define FTPCLIENT_SHORT_DIRLISTING     0
00088 
00091 #define FTPCLIENT_STATUS_SUCCESS       0
00092 
00093 #define FTPCLIENT_SOCKET_ERROR        -1
00094 
00095 #define FTPCLIENT_FILE_NOT_FOUND      -2
00096 
00097 #define FTPCLIENT_FILE_IO_ERROR       -3
00098 
00099 #define FTPCLIENT_ALREADY_LOGGEDIN    -4
00100 
00101 #define FTPCLIENT_NOT_CONNECTED       -5
00102 
00108 unsigned int ftpclient_version(void);
00109 
00122 void ftpclient_init(long milli_seconds);
00123 
00148 int ftpclient_connect(struct sockaddr_in* sa, char *user, char *passwd);
00149 
00161 int ftpclient_settransmissionmode(char flag);
00162 
00175 void ftpclient_setdataconnectionmode(char flag);
00176 
00194 int ftpclient_getfile(char *filename, char *storeas_filename);
00195 
00212 int ftpclient_putfile(char *filename, char *storeas_filename);
00213 
00233 int ftpclient_dir(char *name, char *dir_str, int dir_str_len, char format);
00234 
00235 
00250 int ftpclient_pwd(char *path_str,int path_str_len);
00251 
00265 int ftpclient_cd(char *path_str);
00266 
00281 int ftpclient_rawcmd(char *input_cmd);
00282 
00294 int ftpclient_dataconnection();
00295 
00310 int ftpclient_get_dataconnection_handler();
00311 
00323 int ftpclient_disconnect(void);
00324 
00333 char *ftpclient_getlaststatus(void);
00334 
00335 #endif

Copyright 2005 Dallas Semiconductor, Inc.. Documentation generated by Doxygen.