1 /* ------------------------------------------------------------------ 2 * Copyright (C) 1998-2009 PacketVideo 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 * express or implied. 14 * See the License for the specific language governing permissions 15 * and limitations under the License. 16 * ------------------------------------------------------------------- 17 */ 18 19 #ifndef OSCL_SOCKET_SHUTDOWN_H_INCLUDED 20 #define OSCL_SOCKET_SHUTDOWN_H_INCLUDED 21 22 #include "oscl_socket_types.h" 23 #include "oscl_socket_method.h" 24 25 /** 26 Internal implementation of Shutdown 27 */ 28 class OsclShutdownRequest; 29 30 class OsclShutdownMethod : public OsclSocketMethod 31 { 32 public: 33 static OsclShutdownMethod *NewL(OsclIPSocketI& c); 34 35 ~OsclShutdownMethod(); 36 37 TPVSocketEvent Shutdown(TPVSocketShutdown aHow, 38 int32 aTimeout); 39 40 private: OsclShutdownMethod(OsclIPSocketI & c)41 OsclShutdownMethod(OsclIPSocketI& c) 42 : OsclSocketMethod(c, "osclshutdownmethod", EPVSocketShutdown) 43 {} 44 45 void ConstructL(); 46 47 public: ShutdownRequest()48 OsclShutdownRequest *ShutdownRequest() 49 { 50 return (OsclShutdownRequest*)iSocketRequestAO; 51 } 52 }; 53 54 /** 55 This is the AO that interacts with the socket server 56 */ 57 class OsclShutdownRequest : public OsclSocketRequestAO 58 { 59 public: OsclShutdownRequest(OsclSocketMethod & c)60 OsclShutdownRequest(OsclSocketMethod& c) 61 : OsclSocketRequestAO(c, "osclShutdownRequest") 62 {} 63 64 void Shutdown(TPVSocketShutdown aHow); 65 66 private: Param()67 ShutdownParam*Param() 68 { 69 return (ShutdownParam*)iParam; 70 } 71 }; 72 73 #endif 74 75