00001 /* 00002 * Copyright (C) 2003-2007 Funambol 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 */ 00018 00019 #ifndef INCL_PALM_TRANSPORT_AGENT 00020 #define INCL_PALM_TRANSPORT_AGENT 00021 00023 #include "base/fscapi.h" 00024 00025 #include "http/URL.h" 00026 #include "http/Proxy.h" 00027 #include "http/TransportAgent.h" 00028 00029 #include "http/Sock.h" 00030 00031 00032 /* 00033 * This class is the transport agent responsible for messages exchange 00034 * over an HTTP connection. 00035 * This is a generic abtract class which is not bound to any paltform 00036 */ 00037 00038 class PalmTransportAgent : public TransportAgent { 00039 00040 private: 00041 Sock* sk; 00042 00043 void init() EXTRA_SECTION_03; 00044 00045 public: 00046 PalmTransportAgent() EXTRA_SECTION_03; 00047 PalmTransportAgent(URL& url, Proxy& proxy, unsigned int responseTimeout = DEFAULT_MAX_TIMEOUT) EXTRA_SECTION_03; 00048 ~PalmTransportAgent() EXTRA_SECTION_03; 00049 00050 /* 00051 * Sends the given SyncML message to the server specified 00052 * by the instal property 'url'. Returns the response status code. 00053 * Use getResponse() to get the server response. 00054 */ 00055 WCHAR* sendMessage(WCHAR* msg); 00056 }; 00057 00059 #endif