22#if !defined(__ES_SOCK_H__)
29#undef _DEBUG_SOCKET_FUNCTIONS
31#define _DEBUG_SOCKET_FUNCTIONS
34#include <comms-infras/metacontainer.h>
35#include <elements/sd_errors.h>
36#include <comms-infras/es_parameterset.h>
38#include <comms-infras/es_event.h>
41using Meta::SMetaDataECom;
42using Meta::RMetaDataEComContainer;
48 class CCommsDataObjectBase;
54_LIT8(SOCKET_SERVER_MAIN_MODULE_NAME,
"ESock_Main");
55_LIT8(SOCKET_SERVER_IP_MODULE_NAME,
"ESock_IP");
56_LIT8(SOCKET_SERVER_BT_MODULE_NAME,
"ESock_Bt");
57_LIT8(SOCKET_SERVER_IR_MODULE_NAME,
"ESock_Ir");
58_LIT8(SOCKET_SERVER_SMSWAP_MODULE_NAME,
"ESock_SmsWap");
218class TSockAddr :
public TBuf8<KMaxSockAddrSize>
241 IMPORT_C TUint
Family()
const;
243 IMPORT_C TUint
Port()
const;
244 IMPORT_C
void SetPort(TUint aPort);
249 inline TUint8*
UserPtr()
const;
469const TUint
KSIQOS=0x00000800;
680 friend class RCommsApiExtensionBase;
681 friend class CCommsSessionApiExtProvider;
710 IMPORT_C TInt
Connect(TUint aMessageSlots = (TUint) -1);
731 IMPORT_C TInt
__DbgControl(
const ESockDebug::TControlMsg& aRequestMsg);
736 friend class RCommsApiExtensionBase;
737 friend class CCommsSubSessionApiExtProvider;
741class RSocket :
public RCommsSubSession
779 IMPORT_C TInt
Open(
RSocketServ& aServer,TUint addrFamily,TUint sockType,TUint protocol);
818 IMPORT_C TInt
Listen(TUint qSize,
const TDesC8& aConnectData);
819 IMPORT_C TInt
SetOpt(TUint anOptionName,TUint anOptionLevel,
const TDesC8& anOption=TPtrC8(NULL,0));
820 IMPORT_C TInt
SetOpt(TUint anOptionName,TUint anOptionLevel,TInt anOption);
821 IMPORT_C TInt
GetOpt(TUint anOptionName,TUint anOptionLevel,TDes8& anOption);
822 IMPORT_C TInt
GetOpt(TUint anOptionName,TUint anOptionLevel,TInt& anOption);
829 IMPORT_C
void Close();
914 IMPORT_C TInt
Query(
const TDesC8& aQuery, TDes8& aResult);
917 IMPORT_C TInt
SetOpt(TUint anOptionName,TUint anOptionLevel,
const TDesC8& anOption=TPtrC8(NULL,0));
936 IMPORT_C TInt
Open(
RSocketServ& aSocketServer,TUint anAddrFamily,TUint sockType,TUint aProtocol);
945 IMPORT_C
void Close();
968 IMPORT_C TInt
Open(
RSocketServ& aSocketServer,TUint anAddrFamily,TUint aProtocol);
970 IMPORT_C TInt
Query(
const TDesC8& aQuery,TDes8& aResult);
972 IMPORT_C TInt
Add(
const TDesC8& anItem);
974 IMPORT_C TInt
Remove(
const TDesC8& anItem);
975 IMPORT_C
void Close();
990class TSubConnectionInfo;
991class TSubConnectionEvent;
1088 IMPORT_C TInt
Start(TConnPref& aPref);
1089 IMPORT_C TInt
Stop();
1135 IMPORT_C TInt
GetParameters(ESock::CCommsDataObjectBase& aDataObject);
1136 IMPORT_C TInt
SetParameters(ESock::CCommsDataObjectBase& aDataObject);
1146 IMPORT_C
void Ioctl(TUint aOptionLevel, TUint aOptionName,
TRequestStatus& aStatus, TDes8* aDesc);
1149 IMPORT_C TInt
Control(TUint aOptionLevel, TUint aOptionName, TDes8& aOption);
1150 IMPORT_C TInt
GetOpt(TUint aOptionLevel, TUint aOptionName, TInt& aOption);
1151 IMPORT_C TInt
SetOpt(TUint aOptionLevel, TUint aOptionName, TInt aOption = 0);
1181 TUint32 iReserved[4];
1232class CSubConParameterBundle;
1250class RParameterFamily;
1296 IMPORT_C TUint
Length()
const;
1297 IMPORT_C TInt
Load(TPtrC8& aDes);
1298 IMPORT_C TInt
Store(TDes8& aDes)
const;
1315 IMPORT_C
void ConstructL(CSubConParameterBundle& aBundle);
1320 const TUint32 iFamilyId;
1321 RMetaDataEComContainer iGenericSets;
1327class RParameterFamilyBundle;
1345 IMPORT_C
void Close();
1347 IMPORT_C TUint
Length()
const;
1348 IMPORT_C TInt
Load(
const TDesC8& aDes);
1349 IMPORT_C TInt
Store(TDes8& aDes)
const;
1373 mutable CSubConParameterBundle* iBundle;
1391 IMPORT_C TInt32
GroupId()
const;
1392 IMPORT_C TUint32
Id()
const;
1395#ifndef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
1406 IMPORT_C TInt32
GroupId()
const;
1407 IMPORT_C TUint32
Id()
const;
1463 IMPORT_C
void Close();
1465 IMPORT_C TInt
Start();
1466 IMPORT_C TInt
Stop();
1477 IMPORT_C TInt
SetParameters(
const RParameterFamilyBundle& aParametersSet);
1486 IMPORT_C TInt
Control(TUint aOptionLevel, TUint aOptionName, TDes8& aOption);
1513 IMPORT_C
static TUint32
Swap32(TUint32 aVal);
1514 IMPORT_C
static TUint16
Swap16(TUint16 aVal);
1515 inline static TUint16
Swap16(TUint aVal);
1524 IMPORT_C
static TUint32
Get32(
const TUint8* aPtr);
1525 IMPORT_C
static TUint16
Get16(
const TUint8* aPtr);
1526 IMPORT_C
static void Put32(TUint8* aPtr, TUint32 aVal);
1527 IMPORT_C
static void Put16(TUint8* aPtr, TUint16 aVal);
1536 IMPORT_C
static TUint32
Get32(
const TUint8* aPtr);
1537 IMPORT_C
static TUint16
Get16(
const TUint8* aPtr);
1538 IMPORT_C
static void Put32(TUint8* aPtr, TUint32 aVal);
1539 IMPORT_C
static void Put16(TUint8* aPtr, TUint16 aVal);
1556 TUint iAccessPointId;
1560#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
1561#include <es_sock_internal.h>
1562#include <es_sock_partner.h>
1565#include <es_sock.inl>
Inserts and extracts integers in big-endian format.
static IMPORT_C void Put16(TUint8 *aPtr, TUint16 aVal)
static IMPORT_C TUint32 Get32(const TUint8 *aPtr)
static IMPORT_C void Put32(TUint8 *aPtr, TUint32 aVal)
static IMPORT_C TUint16 Get16(const TUint8 *aPtr)
Reverses the byte order in 16 and 32-bit values.
static IMPORT_C TUint32 Swap32(TUint32 aVal)
Reverses the order of the bytes in a 32-bit value.
static IMPORT_C TUint16 Swap16(TUint16 aVal)
Reverses the order of the bytes in a 16-bit value.
Base class for extended RSubConnection parameter sets.
IMPORT_C CSubConExtensionParameterSet()
IMPORT_C ~CSubConExtensionParameterSet()
Base class for generic RSubConnection parameter sets.
IMPORT_C CSubConGenericParameterSet()
IMPORT_C ~CSubConGenericParameterSet()
IMPORT_C TUint32 Id() const
static IMPORT_C CSubConNotificationEvent * NewL(const STypeId &aTypeId)
IMPORT_C TBool IsGeneric() const
IMPORT_C TInt32 GroupId() const
Container of RSubConnection parameter sets.
IMPORT_C void AddExtensionSetL(CSubConExtensionParameterSet &aExtensionSet, TParameterSetType aType)
Adds an extension parameter set to a sub-connection parameter set family.
IMPORT_C TInt Store(TDes8 &aDes) const
Instructs this sub-connection family to create a serialised version of itself and append it to the bu...
IMPORT_C CSubConExtensionParameterSet * FindExtensionSet(TUid aSetId, TParameterSetType aType)
Searches a sub-connection parameter family for an extension parameter set.
IMPORT_C void ClearAllParameters(TParameterSetType aType)
Clears (removes and deletes) all parameter sets with the type specified.
TUint32 Id()
Fetch the identity of the sub-connection parameter family.
static IMPORT_C CSubConParameterFamily * NewL(RSubConParameterBundle &aBundle, TUint32 aFamilyId)
Creates a new sub-connection parameter set family.
RMetaDataEComContainer iExtensionSets[ENumValues]
static IMPORT_C CSubConParameterFamily * LoadL(RSubConParameterBundle &aBundle, TPtrC8 &aBuffer)
Creates a new sub-connection parameter set family from a buffer containing the serialised object.
IMPORT_C CSubConGenericParameterSet * GetGenericSet(TParameterSetType aType)
Accessor for the sub-connection generic parameter set of a family.
IMPORT_C TInt Load(TPtrC8 &aDes)
Instructs this sub-connection family to set its members based on the serialiesd data in the buffer pa...
IMPORT_C void SetGenericSetL(CSubConGenericParameterSet &aGenericSet, TParameterSetType aType)
Assigns the generic parameter set of a sub-connection parameter set family.
void CopyToFamilyL(RParameterFamily &aDest) const
Copy the parameters of this CSubConParameterFamily to a RParameterFamily.
virtual IMPORT_C ~CSubConParameterFamily()
Sub-connection parameter family destructor.
IMPORT_C TUint Length() const
Calculates the length of buffer required to serialise this parameter set family.
IMPORT_C void ConstructL(RSubConParameterBundle &aBundle)
Set up the sub-connection family with empty sets.
static IMPORT_C TInt32 ExtractFamilyAndCreateBufferL(TPtrC8 &aBuffer, TPtrC8 &aContainerBuffer)
Used internally to extract the family id for the descriptor storing the serialised version of this ob...
void CopyFromFamilyL(RParameterFamily &aSrc)
Copy the parameters of this CSubConParameterFamily from a RParameterFamily.
Base class for all RSubConnection parameter sets.
static IMPORT_C CSubConParameterSet * NewL(const STypeId &aTypeId)
virtual ~CSubConParameterSet()
Inserts and extracts integers in little-endian format.
static IMPORT_C void Put32(TUint8 *aPtr, TUint32 aVal)
static IMPORT_C TUint16 Get16(const TUint8 *aPtr)
static IMPORT_C void Put16(TUint8 *aPtr, TUint16 aVal)
static IMPORT_C TUint32 Get32(const TUint8 *aPtr)
The management interface for a network connection or subconnection.
IMPORT_C void DataSentNotificationCancel()
Cancels a request for the amount of data sent on this connection, as issued by DataSentNotificationRe...
IMPORT_C void DataReceivedNotificationRequest(TUint aThreshold, TPckg< TUint > &aDownlinkVolume, TRequestStatus &aStatus)
Requests a notification after an additional aThreshold bytes have been received by this connection.
IMPORT_C void CancelAllInterfaceNotification()
Cancels a change notification request previously issued by a call to AllInterfaceNotification().
TBool SameSession(TInt aSessionHandle)
Checks that the Session Handle passed is the same as that of this RConnection.
IMPORT_C void WaitForIncoming(RSubConnection &aIncomingSubConnection, TRequestStatus &aStatus)
Subscribe for an incoming session on this connection.
IMPORT_C TInt GetConnectionInfo(TUint aIndex, TDes8 &aConnectionInfo)
Gets information about one of the currently active connections.
IMPORT_C void CancelAllSubConnectionNotification()
Cancels the request for notification to changes to the state of subconnections, made using the AllSub...
IMPORT_C void IsSubConnectionActiveRequest(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aSecs, TPckg< TBool > &aState, TRequestStatus &aStatus)
Checks whether the subconnection is active or has changed state (active/inactive)
IMPORT_C void AllSubConnectionNotification(TSubConnectionNotificationBuf &aSubConnectionEvent, TRequestStatus &aStatus)
Requests notification of any change in the state of any of the subconnections belonging to this RConn...
IMPORT_C TInt Open(RSocketServ &aSocketServer, TUint aConnectionType=KConnectionTypeDefault)
Opens a new RConnection instance.
IMPORT_C RConnection()
Connection Management Interface.
IMPORT_C void CancelWaitForIncoming()
Cancel the previous subscription for an incoming session.
IMPORT_C void CancelServiceChangeNotification()
Cancels a request for notification of change of service for the connection, as issued by ServiceChang...
IMPORT_C void IsSubConnectionActiveCancel(TSubConnectionUniqueId aSubConnectionUniqueId)
IMPORT_C TInt GetOpt(TUint aOptionLevel, TUint aOptionName, TInt &aOption)
Gets an option.
IMPORT_C TInt GetIntSetting(const TDesC &aSettingName, TUint32 &aValue)
IMPORT_C TInt GetLongDesSetting(const TDesC &aSettingName, TDes &aValue)
IMPORT_C void ServiceChangeNotification(TUint32 &aNewISPId, TDes &aNewServiceType, TRequestStatus &aStatus)
Requests service change notification from the agent.
IMPORT_C void Close()
Closes the connection.
IMPORT_C TInt EnumerateSubConnections(TUint &aCount)
Asks the server to gather information on the currently active subconnections.
IMPORT_C void Ioctl(TUint aOptionLevel, TUint aOptionName, TRequestStatus &aStatus, TDes8 *aDesc)
Get information on the connection in an asynchronous manner.
IMPORT_C TInt Stop()
Stops the entire connection by disconnecting the underlying network interface immediately,...
IMPORT_C void DataTransferredCancel()
Cancels a request for the amount of data transferred on the entire connection, issued by DataTransfer...
TConnStopType
Identifies the type of requirement for stopping the connection.
@ EStopAuthoritative
Any sockets or host/service resolvers associated with this interface will be errored with KErrConnect...
@ EStopNormal
Any sockets or host/service resolvers associated with this interface will be errored with KErrCancel.
IMPORT_C TInt GetBoolSetting(const TDesC &aSettingName, TBool &aValue)
IMPORT_C TInt Attach(const TDesC8 &aConnectionInfo, TConnAttachType aAttachType)
Attaches the RConnection object to an existing interface.
IMPORT_C TInt Progress(TNifProgress &aProgress)
Obtains the current progress information for the connection.
IMPORT_C TInt EnumerateConnections(TUint &aCount)
Enumerates the number of currently active interfaces.
IMPORT_C void DataSentNotificationRequest(TUint aThreshold, TPckg< TUint > &aUplinkVolume, TRequestStatus &aStatus)
Requests a notification after an additional aThreshold bytes have been sent by the entire connection.
IMPORT_C void AllInterfaceNotification(TDes8 &aNotification, TRequestStatus &aStatus)
Requests asynchronous change notification for all interfaces.
IMPORT_C TInt LastProgressError(TNifProgress &aProgress)
Obtains information about the last Progress() call which failed with an error.
IMPORT_C void ProgressNotification(TNifProgressBuf &aProgress, TRequestStatus &aStatus, TUint aSelectedProgress=KConnProgressDefault)
Requests asynchronous progress notification for the connection.
IMPORT_C void DataReceivedNotificationCancel()
Cancels a request (issued by DataReceivedNotificationRequest ()) for the amount of data received by t...
IMPORT_C TInt Control(TUint aOptionLevel, TUint aOptionName, TDes8 &aOption)
Gets detailed information on connection clients and sockets.
IMPORT_C void CancelProgressNotification()
Cancels a request for progress notification for the connection, as issued by ProgressNotification().
IMPORT_C void DataTransferredRequest(TPckg< TUint > &aUplinkVolume, TPckg< TUint > &aDownlinkVolume, TRequestStatus &aStatus)
Gets the amount of data that has been transferred by the entire connection.
IMPORT_C TInt GetDesSetting(const TDesC &aSettingName, TDes8 &aValue)
IMPORT_C TInt Name(TName &aName)
Gets the unique name of an RConnection.
IMPORT_C void IsConnectionActiveRequest(TUint aSecs, TPckg< TBool > &aState, TRequestStatus &aStatus)
Checks whether the connection is active or inactive.
IMPORT_C TInt SetParameters(ESock::CCommsDataObjectBase &aDataObject)
Speculative method - Not yet supported Do not call this function, it has ony been introduced for symm...
IMPORT_C TInt SetOpt(TUint aOptionLevel, TUint aOptionName, TInt aOption=0)
Sets an option.
virtual IMPORT_C ~RConnection()
Empty destructor.
IMPORT_C TInt GetSubConnectionInfo(TDes8 &aSubConnectionInfo)
Gets information about one of the currently active subconnections.
IMPORT_C void IsConnectionActiveCancel()
IMPORT_C void CancelIoctl()
Cancel any outstanding Ioctl request.
TConnAttachType
Identifies the intended use of the connection.
@ EAttachTypeMonitor
The system control type of application wishes to monitor the state of the connection without otherwis...
@ EAttachTypeNormal
The application wishes to use the connection for normal data transfer, and the idle timers will take ...
IMPORT_C TInt GetParameters(ESock::CCommsDataObjectBase &aDataObject)
IMPORT_C TInt Start()
Start a connection synchonously using the default connection preferences.
Provides an interface to host name resolution services, such as DNS, that may be provided by particul...
IMPORT_C void GetByAddress(const TSockAddr &anAddr, TNameEntry &aResult, TRequestStatus &aStatus)
Get host by address (as get by name)
IMPORT_C void Close()
Closes a name resolution service.
IMPORT_C void Cancel()
Cancels any outstanding asynchronous calls, which will return with error code KErrCancel.
IMPORT_C void QueryGetNext(TDes8 &aResult, TRequestStatus &aStatus)
Get the next query result.
IMPORT_C TInt SetOpt(TUint anOptionName, TUint anOptionLevel, const TDesC8 &anOption=TPtrC8(NULL, 0))
IMPORT_C TInt Open(RSocketServ &aSocketServer, TUint anAddrFamily, TUint aProtocol)
Initialises a name resolution service provided by a particular protocol.
IMPORT_C void Query(const TDesC8 &aQuery, TDes8 &aResult, TRequestStatus &aStatus)
Protocol - independent query.
IMPORT_C TInt SetHostName(const TDesC &aName)
IMPORT_C TInt GetHostName(TDes &aName)
Gets the name of the local host.
IMPORT_C void GetByName(const TDesC &aName, TNameEntry &aResult, TRequestStatus &aStatus)
Resolves a machine name to a TSockAddress asynchronously.
IMPORT_C void Next(TNameEntry &aResult, TRequestStatus &aStatus)
Get the next response if there is more than one response for a given host name (alias list)
Provides an interface to network databases, such as LM-IAS with IrDA, that may be provided by particu...
IMPORT_C void Remove(const TDesC8 &anItem, TRequestStatus &aStat)
Removes a record from the database asynchronously.
IMPORT_C void Close()
Closes a database access service.
IMPORT_C void Query(const TDesC8 &aQuery, TDes8 &aResult, TRequestStatus &aStat)
Makes a query to the database asynchronously.
IMPORT_C TInt Open(RSocketServ &aSocketServer, TUint anAddrFamily, TUint aProtocol)
Initialises a database access service provided by a particular protocol.
IMPORT_C void Cancel()
Cancels any outstanding asynchronous calls, which will return with error code KErrCancel.
IMPORT_C void Add(const TDesC8 &anItem, TRequestStatus &aStat)
Adds a record to the database asynchronously.
Provides an interface to resolver service names and ports.
IMPORT_C void GetByNumber(const TUint aPort, TDes &aName, TRequestStatus &aStatus)
Gets the name of the service asynchronously.
IMPORT_C void Cancel()
Cancels any pending request.
IMPORT_C void RemoveService(const TDesC &aName, const TUint &aPort, TRequestStatus &aStatus)
Removes a service asynchronously.
IMPORT_C TInt Open(RSocketServ &aSocketServer, TUint anAddrFamily, TUint sockType, TUint aProtocol)
set up the sub session - unlike name resolvers and net databases, services can be socket type specifi...
IMPORT_C void Close()
Closes a service resolver service.
IMPORT_C void GetByName(const TDesC &aName, TPortNum &aPort, TRequestStatus &aStatus)
Gets a service by name asynchronously.
IMPORT_C void RegisterService(const TDesC &aName, const TUint &aPort, TRequestStatus &aStatus)
Registers a new service asynchronously.
Client-side handle to a session with a server.
Provides the Connect() function to create an IPC communication channel to the socket server.
IMPORT_C void SetExclusiveMode(TRequestStatus &aStatus)
Set this session as the socket server exclusive session.
IMPORT_C TInt __DbgCheckHeap(TInt aCount)
Set a heap mark in the socket server.
IMPORT_C TVersion Version() const
Gets the version number of this client.
IMPORT_C TInt __DbgControl(const ESockDebug::TControlMsg &aRequestMsg)
General purpose control message for esock debug, self dispatching messages to be thrown over it.
IMPORT_C TInt __DbgMbufFreeSpace()
Get the amount of free space in the MBuf manager.
IMPORT_C TInt __DbgCheckMbuf(TInt asize)
Set the Mbuf pool limit.
IMPORT_C RSocketServ()
Default Constructor.
IMPORT_C TInt __DbgSetMbufPoolLimit(TInt asize)
Set the Mbuf pool limit.
IMPORT_C TInt __DbgMbufTotalSpace()
Get the amount of free space in the MBuf manager.
IMPORT_C void ClearExclusiveMode()
Clear exclusive mode for this session PLEASE NOTE: This API is currently unsupported,...
IMPORT_C void StopProtocol(TUint anAddrFamily, TUint aSockType, TUint aProtocol, TRequestStatus &aStatus)
Unload a protocol asynchronously - note it will fail if there are any resources open.
IMPORT_C TInt __DbgMarkHeap()
Set a heap mark in the socket server.
IMPORT_C TInt FindProtocol(const TProtocolName &aName, TProtocolDesc &aProtocol)
Gets information about a specific protocol, identified by it's name.
IMPORT_C TInt __DbgMarkEnd(TInt aCount)
Set a heap mark in the socket server.
IMPORT_C TInt Connect(TUint aMessageSlots=(TUint) -1)
Opens a session to the socket server.
IMPORT_C TInt InstallExtension(const TDesC &aDllName, const TDesC &aArgs=TPtrC())
Install an Esock Extension.
IMPORT_C TInt __DbgFailNextMbuf(TInt aCount)
Set a Mbuf mark in the socket server.
IMPORT_C TInt NumProtocols(TUint &aCount)
Gets the number of protocols the socket server is currently aware of.
IMPORT_C TInt GetProtocolInfo(TUint anIndex, TProtocolDesc &aProtocol)
Gets information about a specific protocol.
IMPORT_C TInt __DbgFailNext(TInt aCount)
Set a heap mark in the socket server.
IMPORT_C TBool __DbgCheckFailNext() const
Empty release implementation.
IMPORT_C void StartProtocol(TUint anAddrFamily, TUint aSockType, TUint aProtocol, TRequestStatus &aStatus)
Loads a specified protocol asynchronously.
Provides a client endpoint to a protocol.
IMPORT_C TInt GetDisconnectData(TDes8 &aDesc)
Gets data for use in the disconnection of a socket, namely the remote name of the connected socket.
IMPORT_C void CancelSend()
Cancels an outstanding Send() operation.
IMPORT_C TInt GetOpt(TUint anOptionName, TUint anOptionLevel, TDes8 &anOption)
Gets a socket option.
IMPORT_C TInt Bind(TSockAddr &anAddr)
Sets the local address of a socket.
IMPORT_C void CancelRecv()
Cancels an outstanding Recv() operation.
IMPORT_C void Shutdown(TShutdown aHow, TRequestStatus &aStatus)
Shuts down a connected socket - asynchronous.
IMPORT_C void RemoteName(TSockAddr &anAddr)
Gets the remote name of a connected socket.
IMPORT_C void Recv(TDes8 &aDesc, TUint flags, TRequestStatus &aStatus)
Receives data from a remote host, allowing flags for protocol specific information.
IMPORT_C void Close()
Closes a socket.
IMPORT_C TInt SetOpt(TUint anOptionName, TUint anOptionLevel, const TDesC8 &anOption=TPtrC8(NULL, 0))
Sets a socket option.
IMPORT_C void Write(const TDesC8 &aDesc, TRequestStatus &aStatus)
Sends data to a remote host.
IMPORT_C TInt Open(RSocketServ &aServer, TUint addrFamily, TUint sockType, TUint protocol)
Opens an implicit socket by creating a new subsession to the socket server.
IMPORT_C void RecvFrom(TDes8 &aDesc, TSockAddr &anAddr, TUint flags, TRequestStatus &aStatus)
Receives data from a remote host through a (possibly) unconnected socket and returns a source address...
IMPORT_C void CancelAll()
Cancels all outstanding operations.
IMPORT_C void Ioctl(TUint aCommand, TRequestStatus &aStatus, TDes8 *aDesc=NULL, TUint aLevel=KLevelUnspecified)
Applies an asynchronous I/O control operation on a socket.
IMPORT_C void Connect(TSockAddr &anAddr, TRequestStatus &aStatus)
Connects to a remote host asynchronously.
IMPORT_C TInt Transfer(RSocketServ &aServer, const TDesC &aName)
Transfers a socket from one socket server session to another.
IMPORT_C void LocalName(TSockAddr &anAddr)
Gets the local address of a bound socket.
IMPORT_C void CancelConnect()
Cancels an outstanding connect operation.
IMPORT_C TInt Info(TProtocolDesc &aProtocol)
Gets information in the protocol description for the protocol which a socket is opened on.
IMPORT_C void CancelWrite()
Cancels an outstanding Write() operation.
IMPORT_C RSocket()
Default Constructor.
IMPORT_C TUint LocalPort()
Gets the local port number of a bound socket.
TShutdown
Argument to RSocket::Shutdown() specifying how abruptly the shutdown occurs.
@ EStopInput
Stop socket input and complete when output is stopped.
@ EImmediate
Stop socket input/output and complete (abortive close).
@ ENormal
Complete when socket output/input stopped.
@ EStopOutput
Stop socket output and complete when input is stopped.
IMPORT_C void RecvOneOrMore(TDes8 &aDesc, TUint flags, TRequestStatus &aStatus, TSockXfrLength &aLen)
Receives data from a remote host and completes when data is available.
IMPORT_C void CancelRead()
Cancels an outstanding Read() operation.
IMPORT_C void Accept(RSocket &aBlankSocket, TRequestStatus &aStatus)
Facilitates a client/server connection from a remote socket.
IMPORT_C void SendTo(const TDesC8 &aDesc, TSockAddr &anAddr, TUint flags, TRequestStatus &aStatus)
Sends data to a remote host through a (possibly) unconnected socket to a specified destination addres...
IMPORT_C void Read(TDes8 &aDesc, TRequestStatus &aStatus)
Receives data from a remote host.
IMPORT_C void CancelAccept()
Cancels an outstanding accept operation.
IMPORT_C TInt SetLocalPort(TInt aPort)
Sets the local port of a socket.
IMPORT_C void Send(const TDesC8 &aDesc, TUint someFlags, TRequestStatus &aStatus)
Sends data to a remote host on a connected socket with options set by protocol specific flags.
IMPORT_C TInt Name(TName &aName)
Gets a unique system name for the socket.
IMPORT_C void CancelIoctl()
Cancels an outstanding Ioctl() operation.
IMPORT_C TInt Listen(TUint qSize)
Sets up a socket to listen for incoming connections.
Container for (bundle of) SubConnection parameter families.
IMPORT_C void AddFamilyL(CSubConParameterFamily *aFamily)
Add a sub-connection parameter family to the bundle.
IMPORT_C void Close()
Close the parameter bundle handle.
void CopyFromFamilyBundleL(RParameterFamilyBundle &aSrc)
Copy the contents of an RParameterFamilyBundle to this RSubConParameterBundle.
IMPORT_C TInt Load(const TDesC8 &aDes)
Instructs this sub-connection bundle to set its members based on the serialiesd data in the buffer pa...
TInt CheckBundle() const
Check to see if the handle has a heap object.
IMPORT_C RSubConParameterBundle()
Empty sub-connection parameter bundle constructor.
IMPORT_C CSubConParameterFamily * FindFamily(TUint32 aFamilyId)
Search the sub-connection parameter bundle for a parameter family.
IMPORT_C TInt Store(TDes8 &aDes) const
Instructs this sub-connection parameter bundle to create a serilised version of itself and append it ...
IMPORT_C TUint Length() const
Calculates the length of buffer required to serialise this parameter set bundle.
void CopyToFamilyBundleL(RParameterFamilyBundle &aDest) const
Copy the contents of this parameter bundle to a RParameterFamilyBundle.
IMPORT_C void ClearAllParameters(CSubConParameterFamily::TParameterSetType aType)
Clears (removes and deletes) all parameter sets with the type specified (delegated to the families)
A Sub-Connection, a channel within a Connection.
IMPORT_C void CancelEventNotification()
Cancel an outstanding Event Notification request.
IMPORT_C TInt SetParameters(const RSubConParameterBundle &aParametersSet)
Set Parameters of the sub-connection.
IMPORT_C TInt Control(TUint aOptionLevel, TUint aOptionName, TDes8 &aOption)
IMPORT_C TInt GetParameters(RSubConParameterBundle &aParametersSet)
Fetch the sub-connection's current parameters (Requested, Acceptable and Granted)
IMPORT_C void EventNotification(TNotificationEventBuf &aEventBuffer, TBool aGenericEventsOnly, TRequestStatus &aStatus)
Requests asynchronous event notification for the sub-connection.
IMPORT_C void Close()
Closes the sub-connection.
IMPORT_C TInt Start()
Unused.
IMPORT_C TInt Stop()
Unused.
IMPORT_C void Add(RSocket &aSocket, TRequestStatus &aStatus)
Associate a socket with a subconnection.
IMPORT_C TInt Open(RSocketServ &aServer, TSubConnType aSubConnType, RConnection &aConnection)
Opens a new RSubConnection instance.
IMPORT_C RSubConnection()
Empty sub-connection handle constructor.
IMPORT_C void Remove(RSocket &aSocket, TRequestStatus &aStatus)
Remove a socket from a subconnection.
TBool SameSession(TInt aSessionHandle)
Checks that the Session Handle passed is the same as that of this RSubConnection.
Client-side handle to a sub-session.
Stores Access Point information.
void SetAccessPoint(TUint aAccessPoint)
Sets the 32-bit long integer ID of the access point.
TBool operator==(const TAccessPointInfo &aRhs) const
Compares the 32-bit long integer ID of the specified object with our own.
TUint AccessPoint() const
Returns the 32-bit long integer ID of the access point.
Contains the results of name queries.
@ EPartial
Indicates a partial (truncated) host name.
THostName iName
A host name.
TNameRecord()
Trivial C++ constructor.
TInt iFlags
Flags indicating some attribute about the name, i.e.
TSockAddr iAddr
An address.
Contains information describing an agent.
TVersion iVersion
This class Contains version information.
TName iName
This class Defines a modifiable buffer descriptor that can contain the name of a reference counting o...
Contains progress information on a dial-up connection.
TNifProgress()
It sets the iStage data member to 0 and the iError data member to KErrNone.
TBool operator==(const TNifProgress &aRHS) const
Buffer for Sub-connection event notiifcation.
IMPORT_C TUint32 Id() const
Provides the sub-type Id of the event.
IMPORT_C TInt32 GroupId() const
Provides the group id (Uid) of the event.
IMPORT_C TBool IsGeneric() const
Check whether an event is a generic event (not an extension)
IMPORT_C TNotificationEventBuf()
IMPORT_C ~TNotificationEventBuf()
Packages an object into a modifiable buffer descriptor.
Packages a modifiable pointer descriptor which represents an object of specific type.
Indicates the completion status of a request made to a service provider.
Hint to the Socket Server on what will be the principal usage of the connection.
TUint iAddrFamily
The protocol's address family.
TUint iProtocol
The protocol type.
TUint iReserved3
Reserved.
IMPORT_C TSessionPref()
Default Constructor, makes sure that member data doesn't contain unnitialised values.
TUint iReserved4
Reserved.
TUint iReserved1
Reserved.
TUint iReserved2
Reserved.
Represents an end point address.
IMPORT_C void SetPort(TUint aPort)
Sets the address port of an address.
IMPORT_C TSockAddr()
Default constructor initialises the address to be zero-filled.
IMPORT_C void SetFamily(TUint aFamily)
Sets the address family of an address.
IMPORT_C TUint Family() const
Gets the address family and thereby the type of address.
IMPORT_C TUint Port() const
Gets the port value.
IMPORT_C void SetUserLen(TInt aLen)
Sets the length of data it appends after the base class' data.
IMPORT_C TInt GetUserLen()
Gets the number of bytes a derived class has set beyond the SSockAddr part of the address.
TUint8 * UserPtr() const
Gets an offset to place data after the base class data.
IMPORT_C TBool CmpPort(const TSockAddr &anAddr) const
Compare two ports.
TSubConnType
Defines the type of a subconnection.
A globally unique 32-bit number.
Contains version information.
NONSHARABLE_CLASS(TCleanupTrapHandler)
Implementation for a handler to work with the TRAP mechanism.
TDes8 TDes
Defines a build-independent modifiable descriptor.
TPtrC8 TPtrC
Defines a build-independent non-modifiable pointer descriptor.
TDesC8 TDesC
Defines a build-independent non-modifiable descriptor.
_LIT8(SOCKET_SERVER_MAIN_MODULE_NAME, "ESock_Main")
Canonical names for the core ESOCKSVR modules.
const TUint KSIDatagram
The same as message based.
const TUint KSOUrgentDataOffset
Getting only: retrieve the urgent data offset (only for stream protocols that support urgent data).
const TUint KNSDynamicAddressing
Addressing is dynamic - i.e.
TPckgBuf< TInt > TSockXfrLength
Used in RSocket read and write calls to pass the length of data read and written.
const TUint KSOSelectPoll
Getting only: gets a bitmask of flags describing the read/write/exception status of the socket.
const TUint KIOctlSelect
The aDesc parameter of RSocket::Ioctl() specifies a TUint containing a bitmask of Socket status const...
const TUint KSONonBlockingIO
Socket nonblocking mode.
const TUint KSIPeekData
Protocol supports peeking (looking at the data without removing it from the protocol).
const TUint KSIMessageBased
The protocol is message based.
const TUint KSIGracefulClose
The protocol supports graceful close.
const TUint KSIDisconnectData
The protocol can send user data on a disconnect request.
const TUint KSIMultiPoint
The protocol supports point to multi-point connections.
const TUint KSockSelectWrite
Writing to the socket is not currently blocked by flow-control.
const TUint KSockSelectReadContinuation
Include tail of prior read datagram as available data (ie indicates next read will be with read conti...
const TUint KConnProgressDefault
const TUint KSOSendBuf
Socket send buffer size.
const TUint KSIPseudoStream
The protocol supports a stream like interface but maintains datagram boundaries.
const TUint KSocketInternalOptionBit
const TUint KSocketNoSecurity
No security.
const TUint KSIQOS
The protocol supports a quality of service metric.
const TUint KUndefinedProtocol
Undefined socket type.
const TUint KMaxSockAddrSize
Maximum sockets address size.
const TUint KSIReliable
The protocol is reliable.
const TInt KSocketBufSizeUndefined
Use default buffer size.
const TInt KSocketMessageSizeUndefined
Depends on lower layer or is dynamic.
TBuf< 0x100 > THostName
Defines a descriptor to hold a host name string.
const TUint KSIRequiresOwnerInfo
Protocol is to be informed of the identity of the client (i.e.
const TUint KNSNameRegistration
Protocol supports additions to the name database.
const TUint KSODisableTransfer
Setting only.
const TUint KMaxSubConnectionEventSize
Size of Maximum SubConnection event.
const TUint32 KSubConGlobalFamily
const TUint KNSInfoDatabase
Protocol has another database which is defined by the protocol.
const TUint KUndefinedSockType
Undefined socket type.
const TUint KSIStreamBased
The protocol is stream based.
const TUint KNSHierarchicalNaming
Network naming is hierarchical.
const TInt KSocketMessageSizeIsStream
Reads and writes can be of any size: the data is treated as a stream.
const TInt KLevelUnspecified
Unspecified level.
TBuf< 0x20 > TServiceName
Defines a descriptor to hold a service name string.
const TUint KNSRemoteDiscovery
Addressing is dynamic and should be attempted every time before connecting (like IrDA).
const TUint KNSNameResolution
Protocol supports resolving human readable entity names into network addresses (like DNS).
const TInt KErrCannotFindProtocol
const TUint32 KSubConQoSFamily
const TInt KErrConnectionTerminated
socket errors
const TInt KErrWouldBlock
This error is returned from operations on non-blocking sockets that cannot be completed immediately,...
const TUint32 KSubConIPAddressInfoFamily
const TUint KSIReadOnly
The protocol is read only.
const TUint KSocketInternalReadBit
Must not be set for client requests.
const TUint KSockSeqPacket
Datagrams with sequence numbers.
TPckgBuf< TInt > TPortNum
Port number on service.
TPckgBuf< TNameRecord > TNameEntry
Packages the TNameRecord class so that it can be passed between a client and the socket server.
const TUint KSockReadPeek
Read data without consuming it, data remains in the receive queue.
const TInt KSocketDefaultBufferSize
Default buffer size.
const TInt32 KProtocolExtensionFamily
const TUint KAFUnspec
Default (unspecified) protocol module.
TUint TSubConnectionUniqueId
SubConnection Unique Id.
const TUint KSORecvBuf
Socket receive buffer size.
const TUint KESockDefaultMessageSlots
Default number of message slots.
const TInt32 KSubConnGenericEventsImplUid
const TUint KSockWriteSystemMask
The top 8 bits are reserved for system purposes; protocols must not define these bits.
const TInt KErrTierNotFound
const TUint KSecureSockets
Secure Sockets Layer.
const TUint KSOBlockingIO
Socket blocking mode.
TBuf8< KMaxSubConnectionEventSize > TSubConnectionNotificationBuf
Buffer for notification of any change in the state of SubConnection.
const TUint KSOSelectLastError
Getting only: retrieves the last error.
const TInt32 KSubConnGenericParamsImplUid
const TUint KConnectionUp
Progress Notification to inform clients Connection is up This event has the same numerical values as ...
const TUint KSIUrgentData
The protocol offers an expedited data service.
const TUint KNSRequiresConnectionStartup
Protocol may request Socket Server to startup a connection on its behalf (via the KErrCompletion erro...
const TUint KSIBroadcast
The protocol supports broadcast addresses.
const TUint KSockWriteUrgent
The data to be sent is urgent and is given a higher priority than ordinary data in the send queue.
const TUint32 KSubConAuthorisationFamily
const TInt32 KSubConnParamsInterfaceUid
const TUint KNSHeirarchicalNaming
const TUint KSOReadBytesPending
Getting only: retrieve the number of bytes currently available for reading.
const TUint KSockSelectExcept
An error has occurred.
const TInt KNotificationEventMaxSize
const TUint KSockSelectRead
Data is available to be read; for listening sockets, a connect is pending.
TByteOrder
Used in structure TProtocolDesc to describes the endianness of a protocol.
@ EOtherByteOrder
Other byte order.
@ ELittleEndian
Little endian.
const TUint KSocketInternalWriteBit
Must not be set for client requests.
const TInt KSOLSocket
Generic socket options/commands.
const TUint KSICanReconnect
The same socket can be reconnected if it disconnects (for whatever reason).
const TInt32 KFlowParametersFamily
const TUint KNSServiceResolution
Protocol supports service name to port number resolution.
TBuf< 0x20 > TProtocolName
Contains the name of a protocol in structure TProtocolDesc.
const TUint KSIWriteOnly
The protocol is write only.
const TInt KErrProtocolNotReady
The protocol requested for the socket was recognised but was not able to be used.
TPckgBuf< TNifProgress > TNifProgressBuf
Buffer for Network Interface Progress.
const TInt KErrConnectionContention
const TUint KSockReadContinuation
Read from datagram in a stream-like fashion (not discarding tails).
const TUint KUndefinedAddressFamily
Undefined address family.
const TUint KSockRaw
Raw socket.
const TUint KSIConnectData
The protocol can send user data on a connection request.
const TUint KSockStream
Stream socket.
const TUint KSOEnableTransfer
Setting only.
const TUint32 KSubConnCallDescrParamsFamily
const TUint KSIConnectionLess
The protocol is connectionless.
const TInt32 KSubConnEventInterfaceUid
const TUint KSIInOrder
The protocol guarantees in-order delivery.
const TUint KNSServiceRegistration
Protocol supports additions to the service database.
const TUint KUseEmbeddedUniqueId
const TUint KConnectionTypeDefault
Default connection type.
const TUint32 KSubConnContextDescrParamsFamily
const TUint KSockDatagram
Datagram socket.
const TInt KSocketMessageSizeNoLimit
Data is packet-oriented but packets can be of any size (i.e.
const TUint KSODebug
Debugging enabled or disabled .
const TUint KConnectionDown
Progress Notification to inform clients Connection is up This event has the same numerical values as ...
TUint iPort
Port (or equivilent) number.
TUint iFamily
Address family of socket address.
Socket protocol information for use by clients.
TByteOrder iByteOrder
The byte order that the protocol uses.
TUint iProtocol
An integer specifying the specific protocol.
TUint iSecurity
A bitmask of security flags.
TUint iAddrFamily
An integer identifying the protocol's address family.
TVersion iVersion
The version of the protocol.
TUint iServiceInfo
A bit mask of service information flags.
TUint iNamingServices
A bit mask indicating if the protocol supports name resolution, service resolution,...
TUint iSockType
An integer specifying the socket type.
TInt iMessageSize
The message size of datagram protocols.
TProtocolName iName
The name of the protocol.