00001 00002 #ifndef OSCL_SOCKET_SEND_TO_H_INCLUDED 00003 #define OSCL_SOCKET_SEND_TO_H_INCLUDED 00004 00005 #include "oscl_socket_types.h" 00006 #include "oscl_socket_imp.h" 00007 #include "oscl_socket_method.h" 00008 00012 class OsclSendToRequest; 00013 00014 class OsclSendToMethod : public OsclSocketMethod 00015 { 00016 public: 00017 static OsclSendToMethod *NewL(OsclIPSocketI& c); 00018 ~OsclSendToMethod(); 00019 00020 TPVSocketEvent SendTo(const uint8* &aPtr, uint32 aLen, 00021 OsclNetworkAddress& aAddress, 00022 int32 aTimeout); 00023 00024 uint8 *GetSendData(int32 *aLength); 00025 00026 private: 00027 OsclSendToMethod(OsclIPSocketI& c) 00028 : OsclSocketMethod(c, "osclsendtomethod", EPVSocketSendTo) 00029 {}; 00030 00031 void ConstructL(); 00032 00033 public: 00034 OsclSendToRequest *SendToRequest() 00035 { 00036 return (OsclSendToRequest*)iSocketRequestAO; 00037 } 00038 }; 00039 00043 class OsclSendToRequest : public OsclSocketRequestAO 00044 { 00045 public: 00046 OsclSendToRequest(OsclSocketMethod& c) 00047 : OsclSocketRequestAO(c, "osclSendToRequest") 00048 {} 00049 00050 void SendTo(const uint8* &aPtr, uint32 aLen, OsclNetworkAddress &aAddress); 00051 void Success(); 00052 00053 uint8 *GetSendData(int32 *aLength); 00054 00055 private: 00056 00057 SendToParam*Param() 00058 { 00059 return(SendToParam*)iParam; 00060 } 00061 }; 00062 00063 00064 00065 00066 00067 #endif 00068