mtpfws/mtpfw/daemon/client/interface/rmtpclient.h
changeset 0 d0791faffa3f
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @publishedPartner
       
    19  @released
       
    20 */
       
    21 
       
    22 #ifndef RMTPCLIENT_H
       
    23 #define RMTPCLIENT_H
       
    24 
       
    25 #include <e32std.h>
       
    26 
       
    27 /**
       
    28 Implements the MTP client API. This API provides a control interface to start 
       
    29 and stop MTP services. 
       
    30 @publishedPartner
       
    31 @released
       
    32 */
       
    33 class RMTPClient : public RSessionBase
       
    34     {
       
    35 public:
       
    36 
       
    37     IMPORT_C RMTPClient();
       
    38     IMPORT_C void Close();
       
    39     IMPORT_C TInt Connect();
       
    40     IMPORT_C TInt StartTransport(TUid aTransport);
       
    41     IMPORT_C TInt StartTransport(TUid aTransport, const TDesC8& aParameter);
       
    42     IMPORT_C TInt StopTransport(TUid aTransport);
       
    43     IMPORT_C const TVersion& Version() const;
       
    44 	IMPORT_C TInt  IsAvailable(TUid aTransport);
       
    45 	IMPORT_C TInt  IsProcessRunning();
       
    46 private: // Owned
       
    47 
       
    48     /**
       
    49     The minimum MTP daemon version with which the MTP client API is compatible.
       
    50     */
       
    51     TVersion iVersion;
       
    52     };
       
    53 
       
    54 /**
       
    55 Implements the MTP operational mode Publish & Subscribe key.
       
    56 @publishedPartner
       
    57 @released
       
    58 */
       
    59 static const TInt32 KUidMTPModeKeyValue(0x1028304B);
       
    60 
       
    61 /**
       
    62 Implements the MTP Connection State Publish & Subscribe Category.
       
    63 @publishedPartner
       
    64 @released
       
    65 */
       
    66 const TUid KMTPPublishConnStateCat={0x102827A2};
       
    67 
       
    68 /**
       
    69 Implements the MTP Connection StatePublish & Subscribe key.
       
    70 @publishedPartner
       
    71 @released
       
    72 */
       
    73 enum TMTPConnTypeKey
       
    74 {
       
    75 	EMTPConnStateKey,
       
    76 	EMTPVersionInfo,	
       
    77 };
       
    78 
       
    79 /**
       
    80   These are the different connection states,This events are used for publishing
       
    81   @publishedPartner
       
    82   @released 
       
    83   */
       
    84 enum TMTPConnStateType
       
    85 {
       
    86 	EConnectedToHost = 0,
       
    87 	ESendingDataToHost,
       
    88 	EReceiveDataFromHost,
       
    89 	EDisconnectedFromHost
       
    90 };
       
    91 
       
    92 /**
       
    93   The struct is used for MTP over Bluetooth.
       
    94   @publishedPartner
       
    95   @released
       
    96   */
       
    97 struct TMTPBTRemoteDevice
       
    98     {
       
    99     TInt64   iDeviceAddr;
       
   100     TUint16  iDeviceServicePort;
       
   101     };
       
   102 
       
   103 /**
       
   104   The struct is used for MTP over Bluetooth.
       
   105   @publishedPartner
       
   106   @released
       
   107   */
       
   108 typedef TPckgBuf<TMTPBTRemoteDevice> TMTPBTRemoteDeviceBuf;
       
   109 
       
   110 /**
       
   111   Used for MTP over Bluetooth Parameter Verification.
       
   112   @publishedPartner
       
   113   @released
       
   114   */
       
   115 const TUint8 KMTPBTRemoteDeviceBufLength( 0x0a );
       
   116 
       
   117 #endif // RMTPCLIENT_H