class CObexSrvMtm : public CBaseServerMtm |
Public Member Functions | |
---|---|
~CObexSrvMtm() | |
IMPORT_C void | ChangeL(TMsvEntry, TRequestStatus &) |
IMPORT_C TBool | CommandExpected() |
IMPORT_C void | CopyFromLocalL(const CMsvEntrySelection &, TMsvId, TRequestStatus &) |
IMPORT_C void | CopyToLocalL(const CMsvEntrySelection &, TMsvId, TRequestStatus &) |
IMPORT_C void | CopyWithinServiceL(const CMsvEntrySelection &, TMsvId, TRequestStatus &) |
IMPORT_C void | CreateL(TMsvEntry, TRequestStatus &) |
IMPORT_C void | DeleteAllL(const CMsvEntrySelection &, TRequestStatus &) |
IMPORT_C void | DeleteL(const CMsvEntrySelection &, TRequestStatus &) |
IMPORT_C void | MoveFromLocalL(const CMsvEntrySelection &, TMsvId, TRequestStatus &) |
IMPORT_C void | MoveToLocalL(const CMsvEntrySelection &, TMsvId, TRequestStatus &) |
IMPORT_C void | MoveWithinServiceL(const CMsvEntrySelection &, TMsvId, TRequestStatus &) |
IMPORT_C const TDesC8 & | Progress() |
IMPORT_C void | SetInitialEntry(CMsvServerEntry *) |
Protected Member Functions | |
---|---|
CObexSrvMtm(CRegisteredMtmDll &, CMsvServerEntry *) | |
IMPORT_C void | ConstructL() |
IMPORT_C void | DoCancel() |
IMPORT_C void | DoComplete(TInt) |
IMPORT_C void | DoRunL() |
Public Member Enumerations | |
---|---|
enum | TObexMtmOperations { EObexMtmUiNullOp, EObexMtmUiObexSend } |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Protected Attributes | |
---|---|
CMsvServerEntry * | iEntry |
TRequestStatus * | iReportStatus |
CObexServerSendOperation * | iSendOperation |
Private Attributes | |
---|---|
TPckgBuf< TObexMtmProgress > | iProgress |
Inherited Attributes | |
---|---|
CActive::iStatus | |
CBaseServerMtm::iServerEntry |
IMPORT_C | CObexSrvMtm | ( | CRegisteredMtmDll & | aRegisteredMtmDll, |
CMsvServerEntry * | aEntry | |||
) | [protected] |
Constructor
CRegisteredMtmDll & aRegisteredMtmDll | |
CMsvServerEntry * aEntry | Message Server entry to operate upon |
IMPORT_C void | ChangeL | ( | TMsvEntry | aNewEntry, |
TRequestStatus & | aStatus | |||
) | [virtual] |
Updates a remote entry with relevant data when called by the Message Server.
Implementations should provide this function if the messaging protocol supports updating of remote entries. If this is not supported, implementations should leave with KErrNotSupported.
The Server-side MTM implementation must decide what information in the TMsvEntry is relevant to the remote entry, and translate it appropriately for the specific protocol. Most of the data contained in the TMsvEntry is specific to the Symbian OS Message Server, and would probably have no direct correlation with the protocol's own storage format. Some entry data may however be useful. For example, if the protocol supports remote renaming of folders, the implementation could:
1. check for a folder type entry
2. extract the folder name from aNewEntry.iDetails
3. check if the folder name has changed by comparing the new name with iDetails in the index entry currently; if not, complete with KErrNone
4. initiate a protocol-specific action to rename the remote folder
The implementation should also always update the local Message Server index through CMsvServerEntry::ChangeL().
TMsvEntry aNewEntry | Data by which to update entry |
TRequestStatus & aStatus | Asynchronous completion word for the operation. |
IMPORT_C TBool | CommandExpected | ( | ) | [virtual] |
Tests if the Server-side MTM object should be deleted when called by the Message Server
It is useful to stop the MTM being deleted when more commands are expected shortly. This would be the case, for example, after receiving a command to go online.
If there are no more commands expected by the Server-side MTM object, then the function should return EFalse, and the Message Server will delete it.
IMPORT_C void | ConstructL | ( | ) | [protected] |
Second phase constructor adds Obex server Mtm (this) to the active scheduler
IMPORT_C void | CopyFromLocalL | ( | const CMsvEntrySelection & | aSelection, |
TMsvId | aDestination, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Copies a selection of entries from a local location to a remote location N.B. Leaves as not supported
const CMsvEntrySelection & aSelection | The collection of message index entries for which the copy is required |
TMsvId aDestination | |
TRequestStatus & aStatus | Indicates operation completion |
IMPORT_C void | CopyToLocalL | ( | const CMsvEntrySelection & | aSelection, |
TMsvId | aDestination, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Copies a selection of entries from a remote location to a local location. This will only be meaningful for some protocols.
Requirements:
Implementations should provide this function if the messaging protocol supports retrieval of remote entries. If this is not supported, implementations should leave with KErrNotSupported.
Implementations of this function have three fundamental steps:
1. doing the transfer operation using the appropriate communications protocols
2. converting protocol-specific data into the three-part storage format (index entry, message store, binary files) required by the Message Server
3. updating entries in the Message Server
const CMsvEntrySelection & aSelection | The collection of message index entries for which the copy/moving is required. |
TMsvId aDestination | The entry ID to which the selection is to be copied |
TRequestStatus & aStatus | Asynchronous completion word for the operation |
IMPORT_C void | CopyWithinServiceL | ( | const CMsvEntrySelection & | aSelection, |
TMsvId | aDestination, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Copies a selection of entries within a remote location.
Requirements:
Implementations should provide this function if the messaging protocol supports the ability to copy entries within a remote service. If this is not supported, implementations should leave with KErrNotSupported.
const CMsvEntrySelection & aSelection | The collection of message index entries for which the copy is required |
TMsvId aDestination | The server entry ID to which the selection is to be copied |
TRequestStatus & aStatus | Asynchronous completion word for the operation |
IMPORT_C void | CreateL | ( | TMsvEntry | aNewEntry, |
TRequestStatus & | aStatus | |||
) | [virtual] |
Creates a new remote entry with relevant data when called by the Message Server.
Implementations should provide this function if the messaging protocol supports creation of remote entries. If this is not supported, implementations should leave with KErrNotSupported.
As with ChangeL(), the Server-side MTM implementation must decide what information in the TMsvEntry is relevant to the remote entry, and translate it appropriately for the specific protocol. Most of the data contained in the TMsvEntry is specific to the Message Server, and would probably have no direct correlation with the protocol's own storage format. For example, for a folder, probably only the name and parent are needed, so if the protocol supports creation of remote folders, the implementation could:
1. check for a folder type entry
2. get the folder name and parent details from aNewEntry
3. initiate a protocol-specific action to create the remote folder
TMsvEntry aNewEntry | Data by which to create entry |
TRequestStatus & aStatus | Asynchronous completion word for the operation. |
IMPORT_C void | DeleteAllL | ( | const CMsvEntrySelection & | aSelection, |
TRequestStatus & | aStatus | |||
) | [virtual] |
Deletes each entry in the supplied selection when called by the message Server. If any of the entries in the selection is a parent entry, then all its children should also be deleted, recursively to the bottom of the ownership tree.
Implementations should provide this function if the messaging protocol supports deletion of remote entries. If this is not supported, implementations should leave with KErrNotSupported.
const CMsvEntrySelection & aSelection | The collection of entries that are to be deleted. |
TRequestStatus & aStatus | Asynchronous completion object. |
IMPORT_C void | DeleteL | ( | const CMsvEntrySelection & | aSelection, |
TRequestStatus & | aStatus | |||
) |
const CMsvEntrySelection & aSelection | |
TRequestStatus & aStatus |
IMPORT_C void | DoComplete | ( | TInt | aError | ) | [protected, virtual] |
TInt aError | The leave code given by DoRunL(). |
IMPORT_C void | DoRunL | ( | ) | [protected, virtual] |
Handles the completion of any asynchronous requests that it makes. It is called from the base class RunL() .
Note that any leaves made by this function result in DoComplete() being called with the leave code.
IMPORT_C void | MoveFromLocalL | ( | const CMsvEntrySelection & | aSelection, |
TMsvId | aDestination, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Moves a selection of entries from a local location to a remote location.
Requirements:
Implementations should provide this function if the messaging protocol supports retrieval of remote entries. If this is not supported, implementations should leave with KErrNotSupported.
Implementations of this function have three fundamental steps:
1. reading entry data
2. converting entry data from the Message Server format into that required by the protocol
3. doing the transfer operation using the appropriate communications protocols
The implementation of MoveFromLocalL() should differ from CopyFromLocalL() in additionally deleting the original local data.
const CMsvEntrySelection & aSelection | The collection of message index entries for which the move is required |
TMsvId aDestination | The entry ID of the service by which the entries should be transferred |
TRequestStatus & aStatus | Asynchronous completion word for the operation |
IMPORT_C void | MoveToLocalL | ( | const CMsvEntrySelection & | aSelection, |
TMsvId | aDestination, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Moves a selection of entries from a remote location to a local location.
Requirements:
Implementations should provide this function if the messaging protocol supports retrieval of remote entries. If this is not supported, implementations should leave with KErrNotSupported.
Implementations of this function have three fundamental steps:
1. doing the transfer operation using the appropriate communications protocols
2. converting protocol-specific data into the three-part storage format (index entry, message store, binary files) required by the Message Server
3. updating entries in the Message Server
MoveToLocalL() should differ from CopyToLocalL() in additionally deleting the original remote data.
const CMsvEntrySelection & aSelection | The collection of message index entries for which the moving is required. |
TMsvId aDestination | The entry ID to which the selection is to be copied/moved |
TRequestStatus & aStatus | Asynchronous completion word for the operation |
IMPORT_C void | MoveWithinServiceL | ( | const CMsvEntrySelection & | aSelection, |
TMsvId | aDestination, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Moves a selection of entries within a remote location.
Requirements:
Implementations should provide this function if the messaging protocol supports the ability to move entries within a remote service. If this is not supported, implementations should leave with KErrNotSupported.
The implementation of MoveWithinServiceL() should differ from CopyWithinServiceL() in additionally deleting the original data.
const CMsvEntrySelection & aSelection | The collection of message index entries for which the move is required |
TMsvId aDestination | The server entry ID to which the selection is to be moved |
TRequestStatus & aStatus | Asynchronous completion word for the operation |
IMPORT_C const TDesC8 & | Progress | ( | ) | [virtual] |
Obtains progress from the send operation and copies it into the iProgress member
IMPORT_C void | SetInitialEntry | ( | CMsvServerEntry * | aEntry | ) |
Sets message entry to be sent to aEntry
CMsvServerEntry * aEntry | message server entry (service) |
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.