RAvctp Class Reference
AVCTP service provider
Note that because AVCTP is a connectionless protocol, this class doesn't provide an API to directly control all aspects of whether or not a connection exists to a remote device. It provides an API to force a connection to exist (RAvctp::ConnectRequest()) until either a MaenDisconnectIndicate or MaenDisconnectConfirm event is notified via the
MAvctpEventNotify
class that clients should derive from.
When using
RAvctp
clients need to make the distinction between an explicit connection and an actual connection. All this class provides is an API to bring up and in keeping a connection up by allowing explicit connections to be made. However if no explicit connection to a remote device has been made, that does NOT mandate that no such connection to this remote will exist. Instead it means the client doesn't care if there is a connection or not to this remote. Hence a client can receive messages from or send messages to a device they've not explicitly connected to.
Constructor & Destructor Documentation
RAvctp(const RAvctp &)
RAvctp
|
(
|
const
RAvctp
&
|
aObjectToCopy
|
)
|
[private]
|
The copy constructor is made private to help ensure there is only ever one
RAvctp
object per PID
Member Functions Documentation
Close(TCloseType)
IMPORT_C void
|
Close
|
(
|
TCloseType
|
aImmediacy = ENormal
|
)
|
|
Closes the
RAvctp
session by immediately disconnecting all remote devices it is explicitly connected to, cancelling all outstanding requests and freeing all resources associated with it. This method deregisters aNotify from receiving any more AVCTP event notifications. The client will have to
Open()
this object before it can be used again.
This function is safe to call at almost any time. The only case when this is not appropriate is if a secondary channel is installed in a different thread AND that thread has it's own heap. For this case the UninstallSecondaryChannel function must be called in the thread running the secondary channel BEFORE this function is called.
RAvctp::UninstallSecondaryChannel
Parameters
TCloseType
aImmediacy = ENormal
|
if the default, ENormal, is used then this function will shutdown gracefully. if EImmediate is given then RAvctp will close as quickly as possible which may result in some data not actually being sent that the client had received a successful SendComplete.
|
CloseGracefully()
IMPORT_C void
|
CloseGracefully
|
(
|
)
|
|
This function is not currently supported. Use of it will result in MaenErrorNotify being called with an error of KErrNotSupported.
InstallSecondaryChannel(MAvctpEventNotify &, MAvctpChannel *&)
Installs the second AVCTP channel.
This is separated out from
RAvctp::Open
so that the client can choose to run
RAvctp
in two-thread mode in which the "second channel" Send and receive service provide in AVCTP Services is installed on another thread if the client so chooses.
Open(MAvctpEventNotify &, SymbianAvctp::TPid, MAvctpChannel *&)
Opens a channel to the AVCTP protocol. Only one
RAvctp
can be registered to receive events on each PID.
-
panic
-
if
Open()
is not called before any other
RAvctp
method
-
capability
-
the SID of the process holding the
RAvctp
is checked if it is allowed to access aPid.
-
panic
-
if the
RAvctp
object is already open
Parameters
MAvctpEventNotify
& aNotify
|
the MAvctpEventNotify object to notify with all this RAvctp's AVCTP events.
|
SymbianAvctp::TPid
aPid
|
the PID on which RAvctp will be used
|
MAvctpChannel
*& aPrimaryChannel
|
|
UninstallSecondaryChannel(TCloseType)
IMPORT_C void
|
UninstallSecondaryChannel
|
(
|
TCloseType
|
aImmediacy = ENormal
|
)
|
|
Uninstalls the second AVCTP channel. This can be used for when the AVCTP second channel is run in a different thread to the primary channel.
Parameters
TCloseType
aImmediacy = ENormal
|
if the default, ENormal, is used then this function will shutdown gracefully. if EImmediate is given then the second channel will close as quickly as possible which may result in some data not actually being sent that the client had received a successful SendComplete.
|
Member Enumerations Documentation
Member Data Documentation
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.