multimediacommscontroller/mmccinterface/src/mmccinterface.cpp
branchrcs
changeset 49 64c62431ac08
parent 0 1bce908db942
equal deleted inserted replaced
44:fb024d5e35fa 49:64c62431ac08
   320 		}
   320 		}
   321     __INTERFACE_INT1( "MccInterface::SetRemoteAddress, exit with ", err )
   321     __INTERFACE_INT1( "MccInterface::SetRemoteAddress, exit with ", err )
   322     return err;
   322     return err;
   323     }
   323     }
   324 
   324 
       
   325 
       
   326 // ---------------------------------------------------------------------------
       
   327 // CMccInterface::SetRemoteAddress
       
   328 // Set remote msrp path and port number for a given msrp session and connects with remote end point.
       
   329 // ---------------------------------------------------------------------------
       
   330 //
       
   331 EXPORT_C TInt CMccInterface::SetRemoteMsrpPath( TUint32 aSessionId, 
       
   332                                                TUint32 aLinkId,
       
   333                                                TDes8 &aRemoteMsrpPath,
       
   334                                                TDes8 &aConnStatus)
       
   335     {
       
   336     __INTERFACE( "MccInterface::SetRemoteMsrpPath" )
       
   337     TInt err = KErrNone;
       
   338     TMccAddress addr;
       
   339     addr.iSessionID = aSessionId;
       
   340     addr.iLinkID = aLinkId;
       
   341     addr.iRemoteMsrpPath = aRemoteMsrpPath;
       
   342     addr.iConnStatus = aConnStatus;
       
   343     TMccAddressPckg package( addr );
       
   344 
       
   345     err = iController.CustomCommandSync( iMessageDest,
       
   346                                          EMccSetRemoteMsrpPath,
       
   347                                          package,
       
   348                                          KNullDesC8 );
       
   349 
       
   350     
       
   351     __INTERFACE_INT1( "MccInterface::SetRemoteMsrpPath, exit with ", err )
       
   352     return err;
       
   353     }
       
   354 
   325 // ---------------------------------------------------------------------------
   355 // ---------------------------------------------------------------------------
   326 // CMccInterface::CreateSession
   356 // CMccInterface::CreateSession
   327 // Creates a new RTP session with a remote participant.
   357 // Creates a new RTP session with a remote participant.
   328 // ---------------------------------------------------------------------------
   358 // ---------------------------------------------------------------------------
   329 //
   359 //
   381         }
   411         }
   382 
   412 
   383     __INTERFACE_INT1( "MccInterface::CreateLink, exit with ", result )
   413     __INTERFACE_INT1( "MccInterface::CreateLink, exit with ", result )
   384     return result;
   414     return result;
   385     }
   415     }
       
   416 
       
   417 
       
   418 // ---------------------------------------------------------------------------
       
   419 // CMccInterface::CreateLink
       
   420 // Creates a new Mcc link with a remote participant.
       
   421 // ---------------------------------------------------------------------------
       
   422 //
       
   423 EXPORT_C TInt CMccInterface::CreateLink( TUint32 aSessionId,
       
   424         TInt aLinkType,
       
   425         TUint32& aLinkId,
       
   426         TMccMsrpSettings& aNetSettings)
       
   427     {    
       
   428     __INTERFACE( "MccInterface::CreateLink with msrpsettings")
       
   429     
       
   430     TMccCreateLink pktLink;
       
   431     pktLink.iSessionID = aSessionId;
       
   432     pktLink.iLinkType = aLinkType;
       
   433     pktLink.iIapId = aNetSettings.iIapId;
       
   434     pktLink.iRemoteAddress = aNetSettings.iRemoteAddress;
       
   435     pktLink.iLocalAddress.SetPort( aNetSettings.iLocalAddress.Port() );
       
   436     pktLink.iIpTOS = aNetSettings.iMediaQosValue;
       
   437     TBool fileShare = EFalse;
       
   438     if ( aNetSettings.iFileShare )
       
   439         {
       
   440         fileShare = ETrue;
       
   441         if ( NULL != aNetSettings.iFileName )
       
   442             {
       
   443             pktLink.iFileName.Zero();
       
   444             pktLink.iFileName.Copy( aNetSettings.iFileName->Des());
       
   445             }
       
   446         pktLink.iFileSize = aNetSettings.iFileSize;
       
   447         if (NULL != aNetSettings.iFileType )
       
   448             {
       
   449             pktLink.iFileType.Zero();
       
   450             pktLink.iFileType.Copy(aNetSettings.iFileType->Des());
       
   451             }
       
   452         pktLink.iFileShare = aNetSettings.iFileShare;
       
   453         pktLink.iFTProgressNotification = aNetSettings.iFTProgressNotification;
       
   454         }
       
   455     //pktLink.iLocalMsrpPath = aNetSettings.iLocalMsrpPath;
       
   456     pktLink.iLocalMsrpPath.Zero();
       
   457     
       
   458     TMccCreateLinkPckg package( pktLink );
       
   459 
       
   460     TInt result = iController.CustomCommandSync( iMessageDest,
       
   461                                                  EMccCreateLink,
       
   462                                                  package,
       
   463                                                  KNullDesC8,
       
   464                                                  package );
       
   465 
       
   466     if ( KErrNone == result )
       
   467         {
       
   468         aLinkId = package().iLinkID;
       
   469         if (package().iLocalMsrpPath.Length() > 0 )
       
   470             {
       
   471             aNetSettings.iLocalMsrpPath = package().iLocalMsrpPath.Alloc();
       
   472             }
       
   473         }
       
   474 
       
   475     __INTERFACE_INT1( "MccInterface::CreateLink, exit with ", result )
       
   476     return result;
       
   477     }
       
   478 
       
   479 /*
       
   480 EXPORT_C TInt CMccInterface::CreateLink( TUint32 aSessionId,
       
   481                              TInt aLinkType,
       
   482                              TUint32& aLinkId,
       
   483                              TMccNetSettings& aNetSettings,
       
   484                              TDes8 &aLocalMsrpPath)
       
   485     {
       
   486     // not required .. 
       
   487     // need to be removed.
       
   488     return 0;
       
   489     }
       
   490 */
   386 
   491 
   387 // ---------------------------------------------------------------------------
   492 // ---------------------------------------------------------------------------
   388 // CMccInterface::CloseSession
   493 // CMccInterface::CloseSession
   389 // Closes RTP session.
   494 // Closes RTP session.
   390 // ---------------------------------------------------------------------------
   495 // ---------------------------------------------------------------------------