const
TLitC8
< sizeof("http:const static
TLitC8
<sizeof( "< xmrcc:** > *" )-1, "< xmrcc:*class MUpnpThumbnailCreatorObserver{public:virtual void NotifyThumbnailResultL(CUpnpThumbnailCreator *aThCreator,
TInt
aResult)=0;};class CUpnpThumbnailCreator:public
CActive
{public:enum TPhase{EDecode, EEncode, EScaling, ESleep, EDecodeObject};static CUpnpThumbnailCreator *NewLC(MUpnpThumbnailCreatorObserver *aObserver);~CUpnpThumbnailCreator();void CreateL(const
TDesC
&aSourceFile, const
TDesC
&aThumbName);
TFileName
GetFileName();
TPtrC
GetFileExt();
TFileName
GetPath();
TSize
GetSize(const
TDesC
&aSourceFile);private:void ConstructL();CUpnpThumbnailCreator(MUpnpThumbnailCreatorObserver *aObserver);void EncodeAndConvertL();void RunL();
TInt
RunError(
TInt
aErr);void DoCancel();void CalculateSize(
TSize
&aLoadSize);
TInt
DivisionCeil(const
TInt
aVal, const
TInt
aDiv);private:MUpnpThumbnailCreatorObserver *iObserver;
RFs
iFs;
CImageDecoder
*iDecoder;
CImageEncoder
*iEncoder;
CBitmapScaler
*iScaler;
CFbsBitmap
*iBitmap;
TSize
iSize;
TParse
iParse;
TBuf
<
KExtensionLength
> iExtension;TPhase iPhase;
TFileName
iFileName;
TPath
iPath;
TUid
iImageType;
TSize
iOldSize;
TFrameInfo
iInfo;};#32"X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpcontentdirectory.h"2#1"X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpcdsettings.h"1#define C_CUPNPCDSETTINGS_Hclass CUpnpDevice;class MUpnpThumbnailCreatorObserver;class MUpnpContentDirectoryEventObserver;class MUpnpTransferInterface;struct TUpnpCdSettings{CUpnpDevice *iDevice;const
TDesC
&iDownloadDir;const
TDesC
&iThumbnailDir;const
TDesC
&iDescriptionPath;MUpnpThumbnailCreatorObserver *iThmbObs;
TBool
iCreateThumbnail;
TInt
iMaxRequestCount;MUpnpContentDirectoryEventObserver *iEventObserver;const
TDesC
&iObjectsXmlPath;MUpnpTransferInterface *iTransfer;};#33"X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpcontentdirectory.h"2#1"X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnptransferobserver.h"1#define C_CUPNPTRANSFEROBSERVER_Hclass MUpnpTransferObserver{public:virtual void TransferCompletedL(
TInt
akey,
TInt
aResultCode)=0;virtual void TransferProgress(
TInt
akey,
TInt
aBytes,
TInt
aTotalBytes)=0;};#34"X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpcontentdirectory.h"2#1"X:/epoc32/include/platform/mw/upnphttpservertransactioncreator.h"1#define UPNPHTTPSERVERTRANSACTIONCREATOR_H_class
CUpnpHttpServerTransaction
;class
TDesC8
;class
TInetAddr
;class MUpnpHttpServerTransactionCreator{public:virtual void NewTransactionL(const
TDesC8
&aMethod, const
TDesC8
&aUri, const
TInetAddr
&aSender,
CUpnpHttpServerTransaction
*&aTrans)=0;};#35"X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpcontentdirectory.h"2#1"X:/epoc32/include/platform/mw/upnphttpserverobserver.h"1#define C_MUPNPHTTPSERVEROBSERVER_Hclass CUpnpHttpMessage;class MUpnpHttpServerObserver{public:virtual void HttpEventLD(CUpnpHttpMessage *aMessage)=0;};#36"X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpcontentdirectory.h"2class CUpnpElementFactory;class TUpnpContainerUpdateId;class CUpnpFileTransferTimerObserver;class CUpnpObject;class CUpnpItem;class CUpnpContentDirectoryDb;class CProtocolInfo;class CUpnpMetadataStorage;class CUpnpAutoDestroyObjectList;class MUpnpContentDirectoryEventObserver;class CUpnpFileTransferEvent;class MUpnpCdsSender;class CUpnpStateHandler;class CUpnpTransferUploader;class CUpnpMimeMapper;class CUpnpTransferController;class MUpnpTransferInterface;class CUpnpDlnaFilter;class CUpnpHttpServerSession;class CUpnpSecurityManager;static const TInt KMaxImportExportTransfers=3;const static TLitC8< sizeof("ContentDirectory:1")> KContentDirectoryType={sizeof("ContentDirectory:1")-1,"ContentDirectory:1"};class CUpnpContentDirectory:public CUpnpServiceImplementation, public MUpnpContentDirectoryDataFinder, public MUpnpThumbnailCreatorObserver, public MUpnpTransferObserver, public MUpnpHttpServerTransactionCreator, public MUpnpHttpServerObserver{public:static CUpnpContentDirectory *NewL(TUpnpCdSettings aSettings, CUpnpMetadataStorage *aMetadataStorage, MUpnpTransferInterface *aTransfer);virtual ~CUpnpContentDirectory();IMPORT_C void SetSender(MUpnpCdsSender *aSender);public:CUpnpStateHandler *CUpnpContentDirectory::StateHandler();void AutoDestroyEventL(TInt aObjId, TBool aDeleteObj);void ActionReceivedLD(CUpnpAction *aAction);IMPORT_C void UnknownHttpEventReceivedL(CUpnpHttpMessage &aHttpMsg);void AddressChangeL();void StateVariableEvented(const TDesC8 &aVariableName);TInt CheckImportUriL(const TDesC8 &aImportUri);void InsertRealIpAndPortL(TDes8 &aString);HBufC8 *InsertIpAndPortPlaceholderL(const TDesC8 &aString);CUpnpDlnaProtocolInfo *GetProtocolInfoByImportUriL(const TDesC8 &aImportUri);TInt GetProtocolInfoL(const TDesC8 &aContentUri, CUpnpDlnaProtocolInfo *&aProtocolInfo);void GetTitleForUriL(TInt aObjectId, TPtr &aValue);TInt FindSharedFolderL(const TDesC &aUrlPath, const TDesC &aFileName, HBufC *&aSystemPath);const TPtrC MediaRealDir();void SetDownloadDirectoryL(const TDesC &aDownloadDir);void SetThumbnailDirectoryL(const TDesC &aDownloadDir);TInetAddr GetAddress();IMPORT_C void SendActionL(CUpnpAction *aAction, TUpnpErrorCode aError);IMPORT_C void SendMessageL(CUpnpHttpMessage *aMessage);CUpnpAutoDestroyObjectList *GetAutoDestroyObjectList();IMPORT_C void HttpTransferEventReceivedL(CUpnpHttpMessage &aHttpMsg);void NotifyTransferFailL(TInt aSessionId, TInt aStatusCode);void NotifyTransferStoppedL(TInt aSessionId, CUpnpFileTransfer::TTransferType aType);void HttpGetStartedSoapNotifyL(TInt aSessionId);void HttpPostStartedL(TInt aSessionId);TCurrentAction ExecutedAction();void SetExecutedAction(TCurrentAction aAction);void HttpResponseReceivedL(TInt aSessionId, TInt aStatusCode);MUpnpContentDirectoryEventObserver *EventObserver();public:void TransferCompleteL(TInt aResId, TInt aObjId);void TransferProgress(TInt aId, TInt aBytes, TInt aTotalBytes);void TransferStartL(const TDesC8 &aImpUri);void RemoveFileTransferFromTransferIDsStateVariableL(TInt aTransferID);void AddFileTransferToTransferIDsStateVariableL(TInt aTransferID);TBool IsDrmFileL(const TDesC &aFileName);TBool IsDrmFileL(const TDesC8 &aFileName);TInt CreateResTagL(TInt aSessionId, TDesC8 &aFilePath, TInt aImportNumber, TBool aOnlyThumbnail=EFalse);void NotifyOutgoingTransferL(TInt aSessionId);CUpnpContentDirectoryDb *ContentDirectoryDb();MUpnpTransferInterface *TransferHandler();public:virtual void TransferCompletedL(TInt akey, TInt aResultCode);public:IMPORT_C virtual void NewTransactionL(const TDesC8 &aMethod, const TDesC8 &aUri, const TInetAddr &aSender, CUpnpHttpServerTransaction *&aResultTrans);private:virtual void HttpEventLD(CUpnpHttpMessage *aMessage);private:void PrepareAutoDestroyObjectL(TXmlEngElement aObject, TInt aObjId);HBufC8 *GetIpAndPortDes8L();void SetResSizeL(TXmlEngAttr aSize, const TDesC &aFilePath);void AddImportUriToElL(TXmlEngElement aElement);HBufC8 *BuildImportUriLC();HBufC8 *BuildImportUriShorterLC();TBool IsThumbnailAvailableL(const TDesC &aFile);TBool IsThumbnailAvailableL(const TDesC8 &aFile);void CreateThumbnailL(const TDesC &aSrcFile, TInt aObjId);void AddNewResTagL(TXmlEngElement aObjEl);HBufC *CreateNameForThumbnailL(const TDesC &aFileName);void HandleLocalResourcesL(TXmlEngElement aRes, TInt aObjectId);HBufC8 *BuildContentUriL(const TDesC &aFileExt, TInt aObjectId);TInt DoActionReceivedL(CUpnpAction *aAction);HBufC8 *SerializeObjectsListL(const RArray< RXmlEngDocument > &aObjs);void DeleteOldResourcesL(RXmlEngDocument &aObj, const TDesC8 &aImportUri, const TDesC &aNewFile);HBufC8 *GetImportUriLC(CUpnpHttpMessage *aMessage);HBufC *BuildThumbnailUrlPathL(const TDesC &aFilename, const TDesC &aNextKey);HBufC8 *GetMimeTypeLC(const TDesC8 &aFilename);void RemoveThCreatorAndObjectIdLD(CUpnpThumbnailCreator *aThCreator);TInt GetObjectIdFromThCreator(CUpnpThumbnailCreator *aThCreator);HBufC8 *CreateAddressValueLC();CUpnpDlnaProtocolInfo *CreateProtocolInfoFromMimeL(const TDesC8 &aMimeType, TInt aAddInfo);HBufC *GetFileNameL(TInt aObjId);HBufC *GetFileNameWithoutPathL(TInt aObjId);HBufC *CreateFileNameL(const TDesC16 &aFileName);HBufC8 *GetItemTypeFromMimeTypeLC(const TDesC8 &aMimeType);void CheckItemTypeForObjectL(RXmlEngDocument &obj, const TDesC8 &aMimeType);RXmlEngDocument XmlFragmentL(const TDesC8 &aBuffer);void BrowseElementL(HBufC8 *&aResp, TXmlEngElement &aSen);TInt ContainerUpdateId(const TDesC8 &aContainerID);TUpnpErrorCode AddToMetaDbL(RXmlEngDocument &aFragment, TInt aContainer, TInt *aId, TBool aIsLocal);TUpnpErrorCode PrepareCreateOperationL(RXmlEngDocument &aFragment, RArray< TXmlEngAttr > &aImportUris, RArray< TXmlEngElement > &aRess, TBool &aLocal, TBool &aCreateThumbnailRes, TInt &aNextKey);void ConstructCreateResultsetL(CUpnpAction *&aAction, RXmlEngDocument aElement, TInt aId);TUpnpErrorCode CreateObjectL(CUpnpAction *&aAction);TUpnpErrorCode BrowseL(CUpnpAction *&aAction);TUpnpErrorCode DestroyObjectL(CUpnpAction *&aAction);TUpnpErrorCode CreateReferenceL(CUpnpAction *&aAction);TUpnpErrorCode GetSearchCapabilitiesL(CUpnpAction *&aAction);TUpnpErrorCode GetSortCapabilitiesL(CUpnpAction *&aAction);TUpnpErrorCode GetSystemUpdateIdL(CUpnpAction *&aAction);TUpnpErrorCode ImportResourceL(CUpnpAction *&aAction);TUpnpErrorCode ExportResourceL(CUpnpAction *&aAction);TUpnpErrorCode StopTransferResourceL(CUpnpAction *&aAction);TUpnpErrorCode GetTransferProgressL(CUpnpAction *&aAction);TUpnpErrorCode DeleteResourceL(CUpnpAction *&aAction);HBufC8 *ChangeFileNameWithExtensionL(TDesC8 &aFilePath, const TDesC8 &aMimeType);TInt CreateResTagInternalL(TInt aSessionId, TDesC8 &aFilePath, HBufC8 *aImportUri, TBool aOnlyThumbnail);TInt CreateResTagInternalWithDBRecoveryL(TInt aSessionId, TDesC8 &aFilePath, HBufC8 *aImportUri, TBool aOnlyThumbnail=EFalse);private:void DoSendActionL(CUpnpAction *aAction, TUpnpErrorCode aError);void DoSendMessageL(CUpnpHttpMessage *aMessage);TBool IsValidUrlPath(const TDesC &aUrlPath);HBufC8 *ProtocolInfoFromMimeL(const TDesC8 &aMimeType, TInt aAddInfo, TBool aOpRangeParam, TBool aCiParam=EFalse);HBufC8 *ProtocolInfoFromMimeL(const TDesC8 &aMimeType, TXmlEngElement &aResEl);void NotifyThumbnailResultL(CUpnpThumbnailCreator *aThCreator, TInt aResult);CUpnpThumbnailCreator *CreateThumbnailCreatorL(TInt aObjectId);TBool IsObjectExistL(TInt aObjectId);TBool ValidateObjectL(TInt aObjectId);TInt HandleDbError(TInt aError);TBool IsDbOrDiskProblemL(CUpnpAction *aAction);TBool DataBaseHasBeenRecoveredL(TInt aError);TBool IsDbCreated();TPtrC8 UpdateImportUriL(const TDesC8 &aImportUri);private:CUpnpContentDirectory(CUpnpDevice &aDevice, MUpnpThumbnailCreatorObserver *aThmbObs, MUpnpTransferInterface *aTransfer);void ConstructL(TUpnpCdSettings aSettings, CUpnpMetadataStorage *aMetadataStorage);void ConstructHttpL();private:RArray< TInt > iThObjectIds;RPointerArray< CUpnpThumbnailCreator > iThumbnailCreators;TInt iNextFreeID;CUpnpElementFactory *iElementdb;CUpnpContentDirectoryDb *iContentDirectoryDb;RFs iFs;HBufC *iDownloadDir;HBufC *iThumbDir;TInt iBitmapServerConnection;TBool iEcomUsed;MUpnpThumbnailCreatorObserver *iThmbObs;CUpnpAutoDestroyObjectList *iAutoDestroyObjects;MUpnpContentDirectoryEventObserver *iEventObserver;TBool iCreateThumbnails;TInt iMaxRequestCount;TCurrentAction iCurrentAction;RXmlEngDOMImplementation iDOMImpl;MUpnpCdsSender *iSender;CUpnpMimeMapper *iMimeToExtMap;HBufC *iObjectsXmlPath;CUpnpStateHandler *iStateHandler;CUpnpTransferController *iTransferController;MUpnpTransferInterface *iTransferHandler;CUpnpDlnaFilter *iDlnaFilter;CUpnpHttpServerSession *iHttpServerSession;CUpnpSecurityManager *iSecurityManager;};#32"X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp"2#1"X:/epoc32/include/platform/mw/upnpstring.h"1#define C_UPNPSTRING_Hconst static TLitC8< sizeof("&")> KEt={sizeof("&")-1,"&"};const static TLitC8< sizeof("&")> KEtAmp={sizeof("&")-1,"&"};const static TLitC8< sizeof("<")> KEtlt={sizeof("<")-1,"<"};const static TLitC8< sizeof(">")> KEtgt={sizeof(">")-1,">"};const static TLitC8< sizeof("'")> KApostrophe={sizeof("'")-1,"'"};const static TLitC8< sizeof("'")> KEtApos={sizeof("'")-1,"'"};const static TLitC8< sizeof(""")> KEtQuot={sizeof(""")-1,"""};const static TLitC8< sizeof("%20")> KCSpace={sizeof("%20")-1,"%20"};const TInt KUrlCharNoLen=3;const TInt KOneCharLen=1;namespace UpnpString{IMPORT_C TBool IsColon(const TUint8 &aChar);IMPORT_C HBufC8 *FromUnicodeL(const TDesC &aBuffer);IMPORT_C HBufC16 *ToUnicodeL(const TDesC8 &aBuffer);IMPORT_C HBufC8 *CurrentDateLC();HBufC8 *GetDateLC(const TTime &aTime);const TDesC8 &GetWeekday(const TTime &aDate);const TDesC8 &GetMonth(const TDateTime &aDate);IMPORT_C void CutToPiecesL(TPtrC8 aPtr, TChar aDelim, RPointerArray< TPtrC8 > &aArray);IMPORT_C TPtrC8 Trim(TPtrC8 aPtr, TBool aQuotations=EFalse);IMPORT_C HBufC8 *TrimLC(const TDesC8 &aBuf, TBool aQuotations);IMPORT_C HBufC8 *ValueFromCsvL(const TDesC8 &aCSV, TInt aPlace);IMPORT_C HBufC8 *AddValueToCsvL(const TDesC8 &aCSV, const TDesC8 &aValue);IMPORT_C HBufC8 *RemoveFromCsvLC(const TDesC8 &aCSV, const TDesC8 &aValue);IMPORT_C void CsvToRPointerArrayL(const TDesC8 &aCSV, RPointerArray< TPtrC8 > &aArray);IMPORT_C HBufC8 *RPointerArrayToCsvLC(RPointerArray< TPtrC8 > &aArray);IMPORT_C void AppendStringL(CBufFlat &aString, const TDesC8 &aString2);IMPORT_C void AppendStringL(HBufC8 *&aString, const TDesC8 &aString2);IMPORT_C TInt StringToInt(const TDesC8 &aStr, TInt *aInt);IMPORT_C void StringReplaceL(const TDesC8 &aOrginal, HBufC8 *&aResult, const TDesC8 &aTrg, const TDesC8 &aReplacement);IMPORT_C HBufC8 *StringReplaceL(const TDesC8 &aStr, const TDesC8 &aTrg, const TDesC8 &aReplacement);IMPORT_C void StringReplaceInPlaceL(TDes8 &aString, const TDesC8 &aTrg, const TDesC8 &aReplacement);IMPORT_C HBufC8 *EncodeXmlStringL(HBufC8 *&aBuf);IMPORT_C HBufC8 *EncodeXmlStringL(const TDesC8 &aBuf);IMPORT_C HBufC8 *DecodeXmlStringL(HBufC8 *&aBuf);IMPORT_C HBufC8 *DecodeXmlStringL(const TDesC8 &aBuf);IMPORT_C HBufC8 *InetToStringL(const TInetAddr &aAddress);IMPORT_C void ReplaceHttpCharactersL(TDes &aString);IMPORT_C void ReplaceHttpCharacters(TDes8 &aString);}#35"X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp"2#1"X:/epoc32/include/platform/mw/upnpargument.h"1#define C_CUPNPARGUMENT_Henum{EIn, EOut};class CUpnpSoapMessage;class CUpnpService;class CUpnpArgument:public CBase{public:static CUpnpArgument *NewL(CUpnpService &aParentService);static CUpnpArgument *NewL(CUpnpArgument &aArgument, CUpnpService &aParentService);virtual ~CUpnpArgument();public:IMPORT_C TArgumentType Type();IMPORT_C TInt Direction() const ;IMPORT_C TDesC8 &RelatedStateVariable();IMPORT_C TDesC8 &Name();IMPORT_C TDesC8 &Value();IMPORT_C void SetValueL(const TDesC8 &aValue);void SetDirectionL(TInt aDirection);void SetNameL(const TDesC8 &aDirection);void SetRelatedStateVarL(const TDesC8 &aRelatedStateVar);void ConstructL();void SetType(TInt aType);private:CUpnpArgument(CUpnpService &aParentService);void ConstructL(CUpnpArgument &aArgument);void DeleteAndNullValue();void CheckErrorL(TInt aError, const TDesC8 &aValue);private:HBufC8 *iName;HBufC8 *iRelatedStateVariable;TInt iDirection;HBufC8 *iValue;TInt iType;CUpnpService &iParentService;};#36"X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp"2#1"X:/epoc32/include/platform/mw/upnphttpmessagefactory.h"1#define C_RUPNPHTTPMESSAGEFACTORY_Hclass RUpnpHttpMessageFactory{public:IMPORT_C static CUpnpHttpMessage *HttpGetL(TInetAddr &aDestination, const TDesC8 &aPath);IMPORT_C static CUpnpHttpMessage *HttpGetL(TInetAddr &aDestination, const TDesC8 &aHeadPath, const TDesC8 &aTailPath);IMPORT_C static CUpnpHttpMessage *HttpGetL(const TDesC8 &aUrl);IMPORT_C static CUpnpHttpMessage *HttpGetL(const TDesC8 &aDestination, const TDesC8 &aPath);IMPORT_C static CUpnpHttpMessage *HttpHeadL(const TDesC8 &aUrl);IMPORT_C static CUpnpHttpMessage *HttpHeadL(const TDesC8 &aDestination, const TDesC8 &aPath);IMPORT_C static CUpnpHttpMessage *HttpHeadL(TInetAddr &aDestination, const TDesC8 &aPath);IMPORT_C static CUpnpHttpMessage *HttpPostL(const TDesC8 &aUrl);IMPORT_C static CUpnpHttpMessage *HttpPostL(const TDesC8 &aDestination, const TDesC8 &aPath);IMPORT_C static CUpnpHttpMessage *HttpPostL(const TInetAddr &aDestination, const TDesC8 &aPath);IMPORT_C static CUpnpHttpMessage *HttpResponseOkL(CUpnpHttpMessage *aMessage);IMPORT_C static CUpnpHttpMessage *HttpResponseOkL(const TInetAddr &aDestination);IMPORT_C static CUpnpHttpMessage *Http11ResponseL(CUpnpHttpMessage *aMessage, TInt aStatus);IMPORT_C static CUpnpHttpMessage *Http11ResponseL(const TInetAddr &aDestination, TInt aStatus);IMPORT_C static CUpnpHttpMessage *HttpResponseErrorL(CUpnpHttpMessage *aMessage, TInt aError);IMPORT_C static CUpnpHttpMessage *HttpResponseErrorL(const TInetAddr &aAddr, TInt aError);IMPORT_C static CUpnpHttpMessage *UpnpResponseErrorL(CUpnpHttpMessage *aMessage, TUpnpErrorCode aError);IMPORT_C static CUpnpHttpMessage *UpnpResponseErrorL(const TInetAddr &aDestination, TUpnpErrorCode aError);private:static void SetHostHeaderL(CUpnpHttpMessage *aMessage, const TInetAddr &aDestination);};#37"X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp"2#1"X:/epoc32/include/platform/mw/upnpdevice.h"1#define C_CUPNPDEVICE_H#1"X:/epoc32/include/platform/mw/upnpdescriptionproperty.h"1#define C_CUPNPDESCRIPTIONPROPERTY_H class TUpnpDevice;class TUpnpService;class CUpnpIcon;class CUpnpDescriptionProperty:public CBase{public:static CUpnpDescriptionProperty *NewL(const TDesC8 &aName, const TDesC8 &aValue);static CUpnpDescriptionProperty *NewL();CUpnpDescriptionProperty();~CUpnpDescriptionProperty();void ConstructL(const TDesC8 &aName, const TDesC8 &aValue);void SetNameL(const TDesC8 &aName);void SetValueL(const TDesC8 &aValue);const TDesC8 &Name();const TDesC8 &Value();private:HBufC8 *iName;HBufC8 *iValue;};#27"X:/epoc32/include/platform/mw/upnpdevice.h"2class TUpnpDevice;class TUpnpService;class CUpnpIcon;class CUpnpDescriptionProperty;const TInt KDefaultDescriptionUrlPort=80;class CUpnpDevice:public CBase{public:enum TUpnpDeviceNetwork{EUnknown=0, ELocalDevice, EHomeNetwork, ERemoteDevice};public:IMPORT_C static CUpnpDevice *NewL(const TUpnpDevice *aDevice, const RPointerArray< TUpnpService > &aServices);virtual ~CUpnpDevice();public:IMPORT_C const TPtrC8 DeviceType();IMPORT_C const TPtrC8 DescriptionProperty(const TDesC8 &aPropertyName);IMPORT_C CDesC8Array &ServiceTypesL();IMPORT_C const TPtrC8 ServiceId(const TDesC8 &aServiceType);IMPORT_C const TPtrC8 ServiceDescriptionUrl(const TDesC8 &aServiceType);IMPORT_C RPointerArray< CUpnpService > &ServiceList();IMPORT_C RPointerArray< CUpnpDevice > &DeviceList();IMPORT_C void GetAllDevices(RPointerArray< CUpnpDevice > &aDevices);IMPORT_C RPointerArray< CUpnpIcon > &Icons();IMPORT_C TBool Alive() const ;IMPORT_C void SetAlive(TBool aAlive);IMPORT_C TBool Expired() const ;IMPORT_C void SetExpired(TBool aAlive);IMPORT_C TBool Local() const ;IMPORT_C void SetLocal(TBool aLocal);IMPORT_C TBool Remote() const ;IMPORT_C TUpnpDeviceNetwork DeviceNetwork() const ;IMPORT_C void SetDeviceNetwork(TUpnpDeviceNetwork aNetworkType);IMPORT_C const TPtrC8 Uuid();void SetUuidL(const TDesC8 &aUUID);void AddDeviceL(CUpnpDevice *device);IMPORT_C const TDesC8 &DescriptionUrl() const ;void SetDescriptionUrlL(const TDesC8 &aDescriptionUrl);IMPORT_C const TPtrC8 DescriptionUrlPath() const ;IMPORT_C TInetAddr DescriptionUrlAddressL() const ;IMPORT_C TInt DescriptionUrlPort() const ;void AttachServiceL(CUpnpService *aService);IMPORT_C void SetAddress(const TInetAddr &aAddr);IMPORT_C virtual TInetAddr Address();IMPORT_C void WaitServiceDescriptionL(TInt aSessionId);IMPORT_C TInt WaitServiceDescriptionCount();IMPORT_C TInt WaitServiceDescriptionSessionId(TInt aIndex);IMPORT_C void WaitServiceDescriptionRemoveSessionId(TInt aIndex);enum TServiceAdd{ENotServiceAdded, EServiceAdded, EAllServicesAdded};TServiceAdd ServiceDescriptionReceiveState() const {return iServiceDescriptionReceiveState;}IMPORT_C void WaitIconL(TInt aSessionId);IMPORT_C TServiceAdd AddServiceL(TInt aSessionId, CUpnpService *aService);enum TIconAdd{ENotIconAdded, EIconAdded, EAllIconsAdded};TIconAdd IconReceiveState() const {return iIconReceiveState;}IMPORT_C TIconAdd AddIcon(TInt aSessionId);IMPORT_C HBufC8 *ConcatWithUrlBaseL(const TDesC8 &aUrl);IMPORT_C TPtrC8 GetProperty(const TDesC8 &aProperty);void SetTypeL(const TDesC8 &aType);void AddDevicePropertyL(CUpnpDescriptionProperty *aDeviceProperty);IMPORT_C void AddIconL(CUpnpIcon *aIcon);IMPORT_C CDesC8Array &ServiceIdL();IMPORT_C CUpnpDevice *CloneL();void DetachService(CUpnpService *aService);public:static TPtrC8 RemoveIpAddress(const TDesC8 &aAddress);void SetRootDevice(TBool aIsRoot);CUpnpDevice();private:void ConstructL(const TUpnpDevice *aDevice, const RPointerArray< TUpnpService > &aServices);static CUpnpDevice *NewL(const TDesC8 &aDescription);TInt ChangeIconSessionIdL(const TInt aOldSessionId, const TInt aNewSessionId);TInt CheckIconSessionIdExist(const TInt aSessionId);public:IMPORT_C const TPtrC8 UrlBase();IMPORT_C const TPtrC8 PresentationUrl();IMPORT_C void SetUrlBaseL(const TDesC8 &aUrlBase);IMPORT_C TBool IsEmbeddDevice();void Init();void CleanupServiceArray();protected:TInt64 iTimeValue;RArray< TInt > iIconSessionIds;RArray< TInt > iServiceDescriptionSessionIds;RPointerArray< CUpnpIcon > iIcons;RPointerArray< CUpnpDevice > iDeviceList;RPointerArray< CUpnpService > iServiceList;TServiceAdd iServiceDescriptionReceiveState;TIconAdd iIconReceiveState;CDesC8ArrayFlat *iServiceTypes;TBool iAlive;TBool iExpired;TBool iIsAllIconsArrived;TUpnpDeviceNetwork iNetworkType;HBufC8 *iDescriptionURL;HBufC8 *iDeviceType;HBufC8 *iDomain;HBufC8 *iUUID;HBufC8 *iClockSeq;TInetAddr iAddress;TInt iHandle;TBool iIsRootDevice;HBufC *iDeviceDescription;RPointerArray< CUpnpDescriptionProperty > iProperties;HBufC8 *iUrlBase;CDesC8ArrayFlat *iServicesId;};#39"X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp"2#1"X:/epoc32/include/platform/mw/upnpfileutils.h"1#define C_UPNPFILEUTILS_Hconst static TLitC8< sizeof("text/html")> KHtml={sizeof("text/html")-1,"text/html"};const static TLitC8< sizeof("text/xml")> KXml={sizeof("text/xml")-1,"text/xml"};const static TLitC8< sizeof("text/plain")> KTxt={sizeof("text/plain")-1,"text/plain"};const static TLitC8< sizeof("image/jpeg")> KJpg={sizeof("image/jpeg")-1,"image/jpeg"};const static TLitC8< sizeof("image/gif")> KGif={sizeof("image/gif")-1,"image/gif"};const static TLitC8< sizeof("image/png")> KPng={sizeof("image/png")-1,"image/png"};const static TLitC8< sizeof("video/mpeg")> KMpeg={sizeof("video/mpeg")-1,"video/mpeg"};const static TLitC8< sizeof("video/x-msvideo")> KAvi={sizeof("video/x-msvideo")-1,"video/x-msvideo"};const static TLitC8< sizeof("audio/mpeg")> KMp3={sizeof("audio/mpeg")-1,"audio/mpeg"};const static TLitC16< sizeof(L".HTML")/2 > KHtml16={sizeof(L".HTML")/2-1, L".HTML"};const static TLitC16< sizeof(L".XML")/2 > KXml16={sizeof(L".XML")/2-1, L".XML"};const static TLitC16< sizeof(L".TXT")/2 > KTxt16={sizeof(L".TXT")/2-1, L".TXT"};const static TLitC16< sizeof(L".JPEG")/2 > KJpeg16={sizeof(L".JPEG")/2-1, L".JPEG"};const static TLitC16< sizeof(L".JPG")/2 > KJpg16={sizeof(L".JPG")/2-1, L".JPG"};const static TLitC16< sizeof(L".GIF")/2 > KGif16={sizeof(L".GIF")/2-1, L".GIF"};const static TLitC16< sizeof(L".PNG")/2 > KPng16={sizeof(L".PNG")/2-1, L".PNG"};const static TLitC16< sizeof(L".MPEG")/2 > KMpeg16={sizeof(L".MPEG")/2-1, L".MPEG"};const static TLitC16< sizeof(L".MPG")/2 > KMpg16={sizeof(L".MPG")/2-1, L".MPG"};const static TLitC16< sizeof(L".AVI")/2 > KAvi16={sizeof(L".AVI")/2-1, L".AVI"};const static TLitC16< sizeof(L".MP3")/2 > KMp316={sizeof(L".MP3")/2-1, L".MP3"};const TInt KIPNumMax=255;const TInt KIPNumMin=1;namespace UpnpFileUtil{IMPORT_C HBufC8 *ReadFileL(const TDesC16 &aFilename);IMPORT_C HBufC8 *GetMimeTypeForFileL(const TDesC16 &aFilename);HBufC8 *GetMimeTypeByExtensionL(const TDesC16 &aFilename);IMPORT_C TPtrC8 ExtractUrlPath(const TDesC8 &aUrl, TPtrC8 &aFilename, TPtrC8 &aScheme, TInt &aParseError);TBool ExtractUrlPathHost(const TDesC8 &aUrl, TInt &aParseError);TInt ExtractNumFromIP(TPtrC8 ippart);TInt DriveNumberFromPath(const TDesC16 &aPath, RFs &aFs);IMPORT_C TPtrC8 ExtractUrlPath(const TDesC8 &aUrl, TPtrC8 &aFilename, TInt &aParseError);IMPORT_C TPtrC8 ExtractUrlPath(const TDesC8 &aUrl, TInt &aParseError);IMPORT_C HBufC8 *SwitchToBackSlashL(const TDesC8 &aUrl);IMPORT_C HBufC *SwitchToBackSlashL(const TDesC &aUrl);IMPORT_C TBool CheckDiskSpaceShortL(const TDesC16 &aPath, TInt aSize, RFs &aFs);IMPORT_C TBool CheckDiskSpaceShortL(TDriveNumber aDriveNumber, TInt aSize);IMPORT_C TInt ParseUri(const TDesC8 &aUrl);}#40"X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp"2#1"X:/epoc32/include/platform/mw/upnpcommonupnplits.h"1#define C_UPNPCOMMONUPNPLITS_H const TInt KLongInfoSize=1000;const TInt KMaxInfoSize=20;const static TLitC8< sizeof("=\"")> Keq={sizeof("=\"")-1,"=\""};const static TLitC8< sizeof("false")> Kfalse={sizeof("false")-1,"false"};const static TLitC8< sizeof("true")> Ktrue={sizeof("true")-1,"true"};const static TLitC8< sizeof(")")> KClosingBracket={sizeof(")")-1,")"};const static TLitC8< sizeof("\")")> KClosingBracketWithQuotation={sizeof("\")")-1,"\")"};const static TLitC8< sizeof(":")> KColon={sizeof(":")-1,":"};const static TLitC8< sizeof(",")> KComma={sizeof(",")-1,","};const static TLitC8< sizeof("")> KEmptyString={sizeof("")-1,""};const static TLitC8< sizeof("<")> KKorp={sizeof("<")-1,"<"};const static TLitC8< sizeof("</")> KKorpSlash={sizeof("</")-1,"</"};const static TLitC8< sizeof("ObjectID")> KObjectID={sizeof("ObjectID")-1,"ObjectID"};const static TLitC8< sizeof("1")> KOne={sizeof("1")-1,"1"};const static TLitC8< sizeof("%i")> KOneNumber={sizeof("%i")-1,"%i"};const static TLitC8< sizeof("%i")> KOneNumber8={sizeof("%i")-1,"%i"};const static TLitC8< sizeof("\r\n")> KPlainLineFeed={sizeof("\r\n")-1,"\r\n"};const static TLitC8< sizeof(">")> KProk={sizeof(">")-1,">"};const static TLitC8< sizeof(":const static TLitC8<sizeof( "" )> KSpace ={sizeof( "" )-1, "" };const static TLitC8<sizeof( "" )> KSpace8 ={sizeof( "" )-1, "" };const static TLitC8<sizeof( "\"")> KQuotation={sizeof("\"")-1,"\""};const static TLitC8< sizeof("\" ")> KQuotationWithSpace={sizeof("\" ")-1,"\" "};const static TLitC8< sizeof("0")> KZero={sizeof("0")-1,"0"};const static TLitC16< sizeof(L"\\")/2 > KBackSlash={sizeof(L"\\")/2-1, L"\\"};const static TLitC16< sizeof(L" ")/2 > KSpace16={sizeof(L" ")/2-1, L" "};const static TLitC16< sizeof(L"\\")/2 > KDoubleBackSlash={sizeof(L"\\")/2-1, L"\\"};const static TLitC< sizeof(L"UPnP messagehandler Panic")/2 > KMessagehandlerPanic={sizeof(L"UPnP messagehandler Panic")/2-1, L"UPnP messagehandler Panic"};const static TLitC8< sizeof(" ")> KEmptyMessage={sizeof(" ")-1," "};const static TLitC8< sizeof(" ")> KMulticastPacket={sizeof(" ")-1," "};const static TLitC16< sizeof(L"LANBearer")/2 > KLanBearer={sizeof(L"LANBearer")/2-1, L"LANBearer"};const static TLitC< sizeof(L"MessageHandler")/2 > KMessageHandlerFilename={sizeof(L"MessageHandler")/2-1, L"MessageHandler"};const static TLitC8< sizeof("Here is an ERROR!")> KErrorHere={sizeof("Here is an ERROR!")-1,"Here is an ERROR!"};const static TLitC8< sizeof("Sent %d/%d")> Servedbytes={sizeof("Sent %d/%d")-1,"Sent %d/%d"};const static TLitC8< sizeof("Served %d bytes")> NBytesServed={sizeof("Served %d bytes")-1,"Served %d bytes"};const static TLitC8< sizeof("RunL(), error %d")> KRunL={sizeof("RunL(), error %d")-1,"RunL(), error %d"};const static TLitC8< sizeof("DISPATCHERENGINE *** Sending of http message fails!")> KSendFail={sizeof("DISPATCHERENGINE *** Sending of http message fails!")-1,"DISPATCHERENGINE *** Sending of http message fails!"};const static TLitC8< sizeof("SERVICE *** Leave during service description parsing: ")> KPanic={sizeof("SERVICE *** Leave during service description parsing: ")-1,"SERVICE *** Leave during service description parsing: "};const static TLitC8< sizeof("index.html")> KIndexHtml={sizeof("index.html")-1,"index.html"};const static TLitC16< sizeof(L"index.html")/2 > KIndexHtml16={sizeof(L"index.html")/2-1, L"index.html"};const static TLitC8< sizeof("index.xml")> KIndexXml={sizeof("index.xml")-1,"index.xml"};const static TLitC16< sizeof(L"index.xml")/2 > KIndexXml16={sizeof(L"index.xml")/2-1, L"index.xml"};const static TLitC8< sizeof("A_ARG_TYPE_ProtocolInfo")> KArgTypeProtocolInfo={sizeof("A_ARG_TYPE_ProtocolInfo")-1,"A_ARG_TYPE_ProtocolInfo"};const static TLitC8< sizeof("A_ARG_TYPE_AVTransportID")> KAvtransId={sizeof("A_ARG_TYPE_AVTransportID")-1,"A_ARG_TYPE_AVTransportID"};const static TLitC8< sizeof("A_ARG_TYPE_ConnectionManager")> KConMan={sizeof("A_ARG_TYPE_ConnectionManager")-1,"A_ARG_TYPE_ConnectionManager"};const static TLitC8< sizeof("A_ARG_TYPE_ConnectionID")> KConId={sizeof("A_ARG_TYPE_ConnectionID")-1,"A_ARG_TYPE_ConnectionID"};const static TLitC8< sizeof("A_ARG_TYPE_ConnectionStatus")> KConStat={sizeof("A_ARG_TYPE_ConnectionStatus")-1,"A_ARG_TYPE_ConnectionStatus"};const static TLitC8< sizeof("A_ARG_TYPE_Direction")> KDirection={sizeof("A_ARG_TYPE_Direction")-1,"A_ARG_TYPE_Direction"};const static TLitC8< sizeof("A_ARG_TYPE_ProtocolInfo")> KProtInf={sizeof("A_ARG_TYPE_ProtocolInfo")-1,"A_ARG_TYPE_ProtocolInfo"};const static TLitC8< sizeof("A_ARG_TYPE_RcsID")> KRcsId={sizeof("A_ARG_TYPE_RcsID")-1,"A_ARG_TYPE_RcsID"};const static TLitC8< sizeof("ConnectionIDs")> KConnectionIDs={sizeof("ConnectionIDs")-1,"ConnectionIDs"};const static TLitC8< sizeof("CurrentConnectionIDs")> KCurConId={sizeof("CurrentConnectionIDs")-1,"CurrentConnectionIDs"};const static TLitC8< sizeof("GetProtocolInfo")> KGetProtInfo={sizeof("GetProtocolInfo")-1,"GetProtocolInfo"};const static TLitC8< sizeof("GetCurrentConnectionIDs")> KGetCurConIds={sizeof("GetCurrentConnectionIDs")-1,"GetCurrentConnectionIDs"};const static TLitC8< sizeof("GetCurrentConnectionInfo")> KGetCurConInfo={sizeof("GetCurrentConnectionInfo")-1,"GetCurrentConnectionInfo"};const static TLitC8< sizeof("Sink")> KSink={sizeof("Sink")-1,"Sink"};const static TLitC8< sizeof("SinkProtocolInfo")> KSinkInf={sizeof("SinkProtocolInfo")-1,"SinkProtocolInfo"};const static TLitC8< sizeof("Source")> KSource={sizeof("Source")-1,"Source"};const static TLitC8< sizeof("SourceProtocolInfo")> KSourceInf={sizeof("SourceProtocolInfo")-1,"SourceProtocolInfo"};const static TLitC8< sizeof("http-get:*:*:*")> KSupportedProtocols={sizeof("http-get:*:*:*")-1,"http-get:*:*:*"};const static TLitC8< sizeof("NULL")> KNull={sizeof("NULL")-1,"NULL"};const static TLitC8< sizeof("output")> KOutput={sizeof("output")-1,"output"};const static TLitC8< sizeof("OK")> KOk={sizeof("OK")-1,"OK"};const static TLitC8< sizeof("RcsID")> KTypeRcsID={sizeof("RcsID")-1,"RcsID"};const static TLitC8< sizeof("AVTransportID")> KTypeAVTransportID={sizeof("AVTransportID")-1,"AVTransportID"};const static TLitC8< sizeof("ProtocolInfo")> KTypeProtocolInfo={sizeof("ProtocolInfo")-1,"ProtocolInfo"};const static TLitC8< sizeof("PeerConnectionManager")> KTypePeerConnectionManager={sizeof("PeerConnectionManager")-1,"PeerConnectionManager"};const static TLitC8< sizeof("PeerConnectionID")> KTypePeerConnectionID={sizeof("PeerConnectionID")-1,"PeerConnectionID"};const static TLitC8< sizeof("Direction")> KTypeDirection={sizeof("Direction")-1,"Direction"};const static TLitC8< sizeof("Status")> KTypeStatus={sizeof("Status")-1,"Status"};const static TLitC8< sizeof("ConnectionID")> KArgument={sizeof("ConnectionID")-1,"ConnectionID"};const static TLitC8< sizeof("PrepareForConnection")> KPrepareForConnection={sizeof("PrepareForConnection")-1,"PrepareForConnection"};const static TLitC8< sizeof("ConnectionComplete")> KConnectionComplete={sizeof("ConnectionComplete")-1,"ConnectionComplete"};const static TLitC8< sizeof("controlURL")> KControlUrl={sizeof("controlURL")-1,"controlURL"};const static TLitC8< sizeof("device")> KDevice={sizeof("device")-1,"device"};const static TLitC8< sizeof("deviceType")> KDeviceType={sizeof("deviceType")-1,"deviceType"};const static TLitC8< sizeof("deviceList")> KDeviceList={sizeof("deviceList")-1,"deviceList"};const static TLitC8< sizeof(".xml")> KDotXml={sizeof(".xml")-1,".xml"};const static TLitC8< sizeof("friendlyName")> KFriendlyName={sizeof("friendlyName")-1,"friendlyName"};const static TLitC8< sizeof("http:const static TLitC8<sizeof( "icon" )> KIcon ={sizeof( "icon" )-1, "icon" };const static TLitC8<sizeof( "iconList" )> KIconList ={sizeof( "iconList" )-1, "iconList" };const static TLitC8<sizeof( "-" )> KLine ={sizeof( "-" )-1, "-" };const static TLitC8<sizeof( "%08x" )> KMask8 ={sizeof( "%08x" )-1, "%08x" };const static TLitC8<sizeof( "manufacturer" )> KManufacturer ={sizeof( "manufacturer" )-1, "manufacturer" };const static TLitC8<sizeof( "manufacturerURL" )> KManufacturerUrl ={sizeof( "manufacturerURL" )-1, "manufacturerURL" };const static TLitC8<sizeof( "modelDescription" )> KModelDescription ={sizeof( "modelDescription" )-1, "modelDescription" };const static TLitC8<sizeof( "modelName" )> KModelName ={sizeof( "modelName" )-1, "modelName" };const static TLitC8<sizeof( "modelNumber" )> KModelNumber ={sizeof( "modelNumber" )-1, "modelNumber" };const static TLitC8<sizeof( "modelURL" )> KModelUrl ={sizeof( "modelURL" )-1, "modelURL" };const static TLitC8<sizeof( ":" )> KSepar ={sizeof( ":" )-1, ":" };const static TLitC8<sizeof( "serialNumber" )> KSerialNumber ={sizeof( "serialNumber" )-1, "serialNumber" };const static TLitC8<sizeof( "service" )> KService ={sizeof( "service" )-1, "service" };const static TLitC8<sizeof( "serviceList" )> KServiceList ={sizeof( "serviceList" )-1, "serviceList" };const static TLitC8<sizeof( "serviceId" )> KServiceId ={sizeof( "serviceId" )-1, "serviceId" };const static TLitC8<sizeof( "serviceType" )> KServiceType ={sizeof( "serviceType" )-1, "serviceType" };const static TLitC8<sizeof( "service:" )> KServiceUrn ={sizeof( "service:" )-1, "service:" };const static TLitC8<sizeof( "SCPDURL" )> KServiceDescriptionUrl ={sizeof( "SCPDURL" )-1, "SCPDURL" };const static TLitC8<sizeof( "eventSubURL" )> KSubscriptionUrl ={sizeof( "eventSubURL" )-1, "eventSubURL" };const static TLitC8<sizeof( ":device:" )> KDeviceSearch ={sizeof( ":device:" )-1, ":device:" };const static TLitC8<sizeof( "\r" )> KR ={sizeof( "\r" )-1, "\r" };const static TLitC8<sizeof( "/" )> KSlash8 ={sizeof( "/" )-1, "/" };const static TLitC8<sizeof( "UDN" )> KUdn ={sizeof( "UDN" )-1, "UDN" };const static TLitC8<sizeof( "uuid:" )> KUuid ={sizeof( "uuid:" )-1, "uuid:" };const static TLitC8<sizeof( "presentationURL" )> KPresentationUrl ={sizeof( "presentationURL" )-1, "presentationURL" };const static TLitC8<sizeof( "URLBase" )> KUrlBase ={sizeof( "URLBase" )-1, "URLBase" };const static TLitC8<sizeof( "NoHeader" )> KNoHeader ={sizeof( "NoHeader" )-1, "NoHeader" };const static TLitC8<sizeof( "80" )> KDefaultHostPort ={sizeof( "80" )-1, "80" };const static TLitC8<sizeof( "uuid:" )> KSidPrefix ={sizeof( "uuid:" )-1, "uuid:" };const static TLitC8<sizeof( "Second-" )> KTimeoutPrefix ={sizeof( "Second-" )-1, "Second-" };const static TLitC8<sizeof( "path" )> KPath ={sizeof( "path" )-1, "path" }; const static TLitC8<sizeof( "GET" )> KGet ={sizeof( "GET" )-1, "GET" };const static TLitC8<sizeof( "Second-" )> KSeconds ={sizeof( "Second-" )-1, "Second-" };const static TLitC8<sizeof( "image/png" )> KMimePng ={sizeof( "image/png" )-1, "image/png" };const static TLitC8<sizeof( "image/jpeg" )> KMimeJpeg ={sizeof( "image/jpeg" )-1, "image/jpeg" };const static TLitC8<sizeof( "C:\\System\\Data\\UPnP\\" )> KUpnpPath ={sizeof( "C:\\System\\Data\\UPnP\\" )-1, "C:\\System\\Data\\UPnP\\" };const static TLitC8<sizeof( "<" )> KLessThan8 ={sizeof( "<" )-1, "<" }; const static TLitC8<sizeof( ">" )> KGreaterThan8 ={sizeof( ">" )-1, ">" }; const static TLitC<sizeof(L"c:" )/2> KMediaDriveLetter ={sizeof(L"c:" )/2-1,L"c:" }; # 41 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpcontainerupdateid.h" 1#define C_CUPNPCONTAINERUPDATEID_Hclass TUpnpContainerUpdateId{public: TUpnpContainerUpdateId();public: HBufC8* iContainerId; TInt iUpdateId;}; # 42 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpcontentdirectorydb.h" 1#define C_CUPNPCONTENTDIRECTORYDB_H# 1 "X:/epoc32/include/d32dbms.h" 1#define __D32DBMS_H__class RFs;class CDbObject;class CDbRowConstraint;class CDbCursor;class CDbDatabase;class CDbIncremental;class CDbNotifier;class TDbColumn;class TDbColumnC;class TDbCol;class CDbColSet;class TDbColSetIter;class TDbKeyCol;class CDbKey;class TDbBookmark;class TDbQuery;class RDbHandleBase;template<class T> class RDbHandle;class RDbRowConstraint;class RDbRowSet;class RDbColReadStream;class RDbColWriteStream;class TDbWindow;class RDbView;template<class T> class TUnion;class TDbLookupKey;class TDbSeekKey;template<TInt S> class TDbSeekMultiKey;class RDbTable;class CDbNames;class RDbDatabase;class RDbIncremental;class RDbUpdate;class RDbNotifier;class RDbs;class RDbNamedDatabase;class RDbStoreDatabase;const TInt KDbMaxName=0x40;const TInt KDbMaxColName=KDbMaxName;typedef TBuf<KDbMaxName> TDbName;typedef TBufC<KDbMaxName> TDbNameC;typedef TBuf<KDbMaxColName> TDbColName;typedef TBufC<KDbMaxColName> TDbColNameC;typedef TInt TDbColNo;const TDbColNo KDbNullColNo=0;const TInt KDbUndefinedCount=-1;const TInt KDbUndefinedLength=-1;const TInt KDbDefaultTextColLength=50;enum TDbColType { EDbColBit, EDbColInt8, EDbColUint8, EDbColInt16, EDbColUint16, EDbColInt32, EDbColUint32, EDbColInt64, EDbColReal32, EDbColReal64, EDbColDateTime, EDbColText8, EDbColText16, EDbColBinary, EDbColLongText8, EDbColLongText16, EDbColLongBinary, EDbColText=EDbColText16, EDbColLongText=EDbColLongText16 };enum TDbTextComparison { EDbCompareNormal, EDbCompareFolded, EDbCompareCollated };class TDbCol { friend class CDbColSet;public: enum {ENotNull=0x01,EAutoIncrement=0x02};public: inline TDbCol() {} inline TDbCol(const TDbCol&); inline TDbCol& operator=(const TDbCol&); IMPORT_C TDbCol(const TDesC& aName,TDbColType aType); IMPORT_C TDbCol(const TDesC& aName,TDbColType aType,TInt aMaxLength); static inline TBool IsLong(TDbColType aType);private: inline TDbCol(const TDesC& aName);public: TDbColType iType; TInt iMaxLength; TUint iAttributes; TDbColNameC iName; };class CDbColSet : public CBase { friend class TDbColSetIter;public: IMPORT_C CDbColSet(); IMPORT_C static CDbColSet* NewL(); IMPORT_C static CDbColSet* NewLC(); IMPORT_C ~CDbColSet(); inline const TDbCol& operator[](TDbColNo aCol) const; IMPORT_C const TDbCol* Col(const TDesC& aColName) const; IMPORT_C TDbColNo ColNo(const TDesC& aColName) const; inline TInt Count() const; inline void Clear(); IMPORT_C CDbColSet& AddL(const TDbCol& aCol); IMPORT_C void Remove(const TDesC& aColName);private: CArrayPakFlat<TDbCol> iColumns; };class TDbColSetIter {public: IMPORT_C TDbColSetIter(const CDbColSet& aColSet); inline operator TAny* () const; inline const TDbCol& operator*() const; inline const TDbCol* operator->) const; IMPORT_C TDbColSetIter& operator++(); inline TDbColSetIter operator++(TInt); inline TDbColNo Col() const;private: const TDbCol* iColumn; TInt iIndex; const CArrayPakFlat<TDbCol>* iArray; };class TDbKeyCol {public: enum TOrder { EAsc, EDesc };public: inline TDbKeyCol() {} inline TDbKeyCol(const TDbKeyCol&); inline TDbKeyCol& operator=(const TDbKeyCol&); IMPORT_C TDbKeyCol(const TDesC& aName,TOrder anOrder=EAsc); IMPORT_C TDbKeyCol(const TDesC& aName,TInt aLength,TOrder anOrder=EAsc);public: TOrder iOrder; TInt iLength; TDbColNameC iName; };class CDbKey : public CBase {public: enum {EUnique=0x01,EPrimary=0x02};public: IMPORT_C CDbKey(); IMPORT_C static CDbKey* NewL(); IMPORT_C static CDbKey* NewLC(); IMPORT_C ~CDbKey(); IMPORT_C CDbKey& AddL(const TDbKeyCol& aKeyCol); IMPORT_C void Remove(const TDesC& aColName); IMPORT_C void Clear(); inline TInt Count() const; inline const TDbKeyCol& operator[](TInt aCol) const; inline void MakeUnique(); inline TBool IsUnique() const; inline void SetComparison(TDbTextComparison aComparison); inline TDbTextComparison Comparison() const; inline void MakePrimary(); inline TBool IsPrimary() const;private: CArrayPakFlat<TDbKeyCol> iKeys; TDbTextComparison iComparison; TInt iAttributes; };class TDbBookmark { friend class RDbRowSet;public: struct TMark { enum {ESize=8}; TUint32 iMark[ESize]; };private: TMark iMark; };class TDbQuery {public: inline TDbQuery(const TDesC& aQuery,TDbTextComparison aComparison=EDbCompareNormal); inline const TDesC& Query() const; inline TDbTextComparison Comparison() const;private: const TDesC& iQuery; TDbTextComparison iComparison; };class RDbHandleBase {public: inline RDbHandleBase(); void Close();protected: inline void Set(CDbObject* aObject); CDbObject& Object() const;protected: CDbObject* iObject; };template <class T>class RDbHandle : public RDbHandleBase {public: inline T* operator=(T* aT); inline T* operator->) const; inline T& operator*() const; inline T* operator()() const; };class RDbRowConstraint { friend class RDbRowSet;public: IMPORT_C TInt Open(const RDbRowSet& aView,TDbQuery aCriteria); IMPORT_C void Close();private: RDbHandle<CDbRowConstraint> iConstraint; };class RDbRowSet { friend class RDbRowConstraint; friend class RDbColReadStream; friend class RDbColWriteStream;public: enum TPosition { EFirst, ENext, EPrevious, ELast, EBeginning, EEnd }; enum TAccess { EUpdatable, EReadOnly, EInsertOnly }; enum TDirection { EForwards, EBackwards }; enum TAccuracy { EEnsure, EQuick };public: IMPORT_C void Close(); IMPORT_C void Reset(); IMPORT_C CDbColSet* ColSetL() const; IMPORT_C TInt ColCount() const; IMPORT_C TDbColType ColType(TDbColNo aCol) const; IMPORT_C TDbCol ColDef(TDbColNo aCol) const; IMPORT_C TBool AtRow() const; IMPORT_C TBool AtBeginning() const; IMPORT_C TBool AtEnd() const; IMPORT_C TInt CountL(TAccuracy anAccuracy=EEnsure) const; IMPORT_C TBool IsEmptyL() const; IMPORT_C TBool GotoL(TPosition aPosition); inline void BeginningL(); inline void EndL(); inline TBool FirstL(); inline TBool LastL(); inline TBool NextL(); inline TBool PreviousL(); IMPORT_C TDbBookmark Bookmark() const; IMPORT_C void GotoL(const TDbBookmark& aMark); IMPORT_C TBool MatchL(const RDbRowConstraint& aConstraint); IMPORT_C TInt FindL(TDirection aDirection,TDbQuery aCriteria); IMPORT_C void GetL(); IMPORT_C void InsertL(); IMPORT_C void InsertCopyL(); IMPORT_C void UpdateL(); IMPORT_C void PutL(); IMPORT_C void Cancel(); IMPORT_C void DeleteL(); inline TBool IsColNull(TDbColNo aCol) const; IMPORT_C TInt ColSize(TDbColNo aCol) const; IMPORT_C TInt ColLength(TDbColNo aCol) const; IMPORT_C TInt8 ColInt8(TDbColNo aCol) const; IMPORT_C TInt16 ColInt16(TDbColNo aCol) const; IMPORT_C TInt32 ColInt32(TDbColNo aCol) const; IMPORT_C TInt64 ColInt64(TDbColNo aCol) const; inline TInt ColInt(TDbColNo aCol) const; IMPORT_C TUint8 ColUint8(TDbColNo aCol) const; IMPORT_C TUint16 ColUint16(TDbColNo aCol) const; IMPORT_C TUint32 ColUint32(TDbColNo aCol) const; inline TUint ColUint(TDbColNo aCol) const; IMPORT_C TReal32 ColReal32(TDbColNo aCol) const __SOFTFP; IMPORT_C TReal64 ColReal64(TDbColNo aCol) const __SOFTFP; inline TReal ColReal(TDbColNo aCol) const; IMPORT_C TTime ColTime(TDbColNo aCol) const; IMPORT_C TPtrC8 ColDes8(TDbColNo aCol) const; IMPORT_C TPtrC16 ColDes16(TDbColNo aCol) const; IMPORT_C TPtrC ColDes(TDbColNo aCol) const; IMPORT_C void SetColNullL(TDbColNo aCol); inline void SetColL(TDbColNo aCol,TInt aValue); IMPORT_C void SetColL(TDbColNo aCol,TInt32 aValue); IMPORT_C void SetColL(TDbColNo aCol,TInt64 aValue); inline void SetColL(TDbColNo aCol,TUint aValue); IMPORT_C void SetColL(TDbColNo aCol,TUint32 aValue); IMPORT_C void SetColL(TDbColNo aCol,TReal32 aValue) __SOFTFP; IMPORT_C void SetColL(TDbColNo aCol,TReal64 aValue) __SOFTFP; IMPORT_C void SetColL(TDbColNo aCol,TTime aValue); IMPORT_C void SetColL(TDbColNo aCol,const TDesC8& aValue); IMPORT_C void SetColL(TDbColNo aCol,const TDesC16& aValue);private: inline MStreamBuf* ColSourceL(TDbColNo aCol) const; inline MStreamBuf* ColSinkL(TDbColNo aCol); CDbCursor& CheckCol(TDbColNo aCol) const; TDbColumnC ColumnC(TDbColNo aCol,TDbColType aType) const; TDbColumn Column(TDbColNo aCol,TDbColType aType);protected: RDbHandle<CDbCursor> iCursor; };class RDbColReadStream : public RReadStream {public: IMPORT_C void OpenL(const RDbRowSet& aView,TDbColNo aCol); IMPORT_C void OpenLC(const RDbRowSet& aView,TDbColNo aCol); };class RDbColWriteStream : public RWriteStream {public: inline RDbColWriteStream() {} inline RDbColWriteStream(const MExternalizer<TStreamRef> &anExternalizer); IMPORT_C void OpenL(RDbRowSet& aView,TDbColNo aCol); IMPORT_C void OpenLC(RDbRowSet& aView,TDbColNo aCol); };class TDbWindow {public: enum TUnlimited { EUnlimited=KMaxTInt }; enum {ENone=0};public: inline TDbWindow(); inline TDbWindow(TUnlimited); IMPORT_C TDbWindow(TInt aForeSlots,TInt aRearSlots); inline TInt Size() const; inline TInt PreferredPos() const;private: TInt iSize; TInt iPreferredPos; };#define KDbUnlimitedWindowclass RDbView : public RDbRowSet {public: IMPORT_C TInt Prepare(RDbDatabase& aDatabase,const TDbQuery& aQuery,TAccess anAccess=EUpdatable); IMPORT_C TInt Prepare(RDbDatabase& aDatabase,const TDbQuery& aQuery,const TDbWindow& aWindow); IMPORT_C TInt Prepare(RDbDatabase& aDatabase,const TDbQuery& aQuery,const TDbWindow& aWindow,TAccess anAccess); IMPORT_C TInt EvaluateAll(); IMPORT_C TInt Evaluate(); IMPORT_C void Evaluate(TRequestStatus& aStatus); IMPORT_C TBool Unevaluated() const; };template <class T>class TUnion {public: inline operator const T&() const; inline const T& operator()() const; inline T& operator()(); inline void Set(const T& aT);private: TUint8 iRep[sizeof(T)]; };class TDbLookupKey {public: struct SColumn { union { TInt32 iInt32; TUint32 iUint32; TUnion<TInt64> iInt64; TReal32 iReal32; TReal64 iReal64; TUnion<TTime> iTime; struct {const TText8* iPtr;TInt iLength;} iDes8; struct {const TText16* iPtr;TInt iLength;} iDes16; }; TDbColType iType; };public: inline TDbLookupKey(); inline TInt Count() const; inline const SColumn* First() const; void Add(TInt aKey); void Add(TUint aKey); void Add(TInt64 aKey); void Add(TReal32 aKey) __SOFTFP; void Add(TReal64 aKey) __SOFTFP; void Add(TTime aKey); void Add(const TDesC8& aKey); void Add(const TDesC16& aKey);private: SColumn& NextKey();private: TInt iCount; SColumn iKey[1]; };class TDbSeekKey { friend class RDbTable;public: inline TDbSeekKey(); inline TDbSeekKey(TInt aKey); inline TDbSeekKey(TUint aKey); inline TDbSeekKey(TInt64 aKey); inline TDbSeekKey(TReal32 aKey); inline TDbSeekKey(TReal64 aKey); inline TDbSeekKey(TTime aKey); inline TDbSeekKey(const TDesC8& aKey); inline TDbSeekKey(const TDesC16& aKey); IMPORT_C TDbSeekKey& Add(TInt aKey); IMPORT_C TDbSeekKey& Add(TUint aKey); IMPORT_C TDbSeekKey& Add(TInt64 aKey); IMPORT_C TDbSeekKey& Add(TReal32 aKey) __SOFTFP; IMPORT_C TDbSeekKey& Add(TReal64 aKey) __SOFTFP; IMPORT_C TDbSeekKey& Add(TTime aKey); IMPORT_C TDbSeekKey& Add(const TDesC8& aKey); IMPORT_C TDbSeekKey& Add(const TDesC16& aKey);private: TDbLookupKey& Check();protected: inline TDbSeekKey(TInt aKeys,TInt);private: TInt iMaxKeys; TDbLookupKey iKey; };template<TInt S>class TDbSeekMultiKey : public TDbSeekKey {public: inline TDbSeekMultiKey();private: TDbLookupKey::SColumn iExtraKeys[S-1]; };class RDbTable : public RDbRowSet {public: enum TComparison { ELessThan, ELessEqual, EEqualTo, EGreaterEqual, EGreaterThan };public: IMPORT_C TInt Open(RDbDatabase& aDatabase,const TDesC& aName,TAccess anAccess=EUpdatable); inline TInt SetIndex(const TDesC& anIndex); inline TInt SetNoIndex(); IMPORT_C TBool SeekL(const TDbSeekKey& aKey,TComparison aComparison=EEqualTo);private: IMPORT_C TInt SetIndex(const TDesC* anIndex); };class CDbNames : public CBase {private: inline CDbNames();public: static CDbNames* NewLC(); ~CDbNames(); inline TInt Count() const; inline const TDesC& operator[](TInt anIndex) const; IMPORT_C void AddL(const TDesC& aName);private: CArrayPakFlat<TDbNameC> iList; };typedef CDbNames CDbTableNames,CDbIndexNames,CDbDatabaseNames;const TInt KDbMaxStrLen = 256;typedef TBufC<KDbMaxStrLen> TDbStringC;class CDbStrings : public CBase {private: inline CDbStrings();public: static CDbStrings* NewLC(); virtual ~CDbStrings(); inline TInt Count() const; inline const TDesC& operator[](TInt aIndex) const; void AddL(const TDesC& aStr);private: CArrayPakFlat<TDbStringC> iList; };class RDbDatabase { friend class RDbView; friend class RDbTable; friend class RDbIncremental; friend class RDbUpdate; friend class RDbNotifier;public: struct TSize {TInt iSize;TInt iUsage;};public: IMPORT_C void Close(); IMPORT_C TInt Destroy(); IMPORT_C TBool IsDamaged() const; IMPORT_C TInt Recover(); IMPORT_C TInt UpdateStats(); IMPORT_C TSize Size() const; IMPORT_C TInt Compact(); IMPORT_C TInt Begin(); IMPORT_C TInt Commit(); IMPORT_C void Rollback(); IMPORT_C TBool InTransaction() const; inline TInt CreateTable(const TDesC& aName,const CDbColSet& aDef); inline TInt CreateTable(const TDesC& aName,const CDbColSet& aDef,const CDbKey& aPrimaryKey); IMPORT_C TInt DropTable(const TDesC& aName); IMPORT_C TInt AlterTable(const TDesC& aName,const CDbColSet& aNewDef); IMPORT_C TInt CreateIndex(const TDesC& aName,const TDesC& aTable,const CDbKey& aKey); IMPORT_C TInt DropIndex(const TDesC& aName,const TDesC& aTable); IMPORT_C TInt Execute(const TDesC& aSql,TDbTextComparison aComparison=EDbCompareNormal); IMPORT_C CDbTableNames* TableNamesL() const; IMPORT_C CDbColSet* ColSetL(const TDesC& aName) const; IMPORT_C CDbIndexNames* IndexNamesL(const TDesC& aTable) const; IMPORT_C CDbKey* KeyL(const TDesC& aName,const TDesC& aTable) const;private: IMPORT_C TInt CreateTable(const TDesC& aName,const CDbColSet& aColSet,const CDbKey* aPrimaryKey);protected: RDbHandle<CDbDatabase> iDatabase; };class RDbIncremental {public: IMPORT_C void Close(); IMPORT_C TInt Next(TInt& aStep); IMPORT_C void Next(TPckgBuf<TInt>& aStep,TRequestStatus& aStatus); IMPORT_C TInt Recover(RDbDatabase& aDatabase,TInt& aStep); IMPORT_C TInt Compact(RDbDatabase& aDatabase,TInt& aStep); IMPORT_C TInt DropTable(RDbDatabase& aDatabase,const TDesC& aTable,TInt& aStep); IMPORT_C TInt AlterTable(RDbDatabase& aDatabase,const TDesC& aTable,const CDbColSet& aNewDef,TInt& aStep); IMPORT_C TInt CreateIndex(RDbDatabase& aDatabase,const TDesC& aName,const TDesC& aTable,const CDbKey& aKey,TInt& aStep); IMPORT_C TInt DropIndex(RDbDatabase& aDatabase,const TDesC& aName,const TDesC& aTable,TInt& aStep); inline TInt Execute(RDbDatabase& aDatabase,const TDesC& aSql,TInt& aStep); IMPORT_C TInt Execute(RDbDatabase& aDatabase,const TDesC& aSql,TDbTextComparison aComparison,TInt& aStep); IMPORT_C TInt UpdateStats(RDbDatabase& aDatabase,TInt& aStep);private: RDbHandle<CDbIncremental> iState; };class RDbUpdate {public: IMPORT_C TInt Execute(RDbDatabase& aDatabase,const TDesC& aSql,TDbTextComparison aComparison=EDbCompareNormal); IMPORT_C void Close(); IMPORT_C TInt Next(); IMPORT_C void Next(TRequestStatus& aStatus); IMPORT_C TInt RowCount() const;private: RDbHandle<CDbIncremental> iUpdate; TPckgBuf<TInt> iRows; };class RDbNotifier {public: enum TEvent { EClose, EUnlock, ECommit, ERollback, ERecover };public: IMPORT_C TInt Open(RDbDatabase& aDatabase); IMPORT_C void Close(); IMPORT_C void NotifyUnlock(TRequestStatus& aStatus); IMPORT_C void NotifyChange(TRequestStatus& aStatus); IMPORT_C void Cancel();private: RDbHandle<CDbNotifier> iNotifier; };class RDbs : public RSessionBase {public: typedef enum {EReadPolicy, EWritePolicy, ESchemaPolicy} TPolicyType;public: IMPORT_C static TVersion Version(); IMPORT_C TInt Connect(); IMPORT_C CDbDatabaseNames* DatabaseNamesL(TDriveNumber aDrive, TUid aPolicyUid); IMPORT_C TInt CopyDatabase(const TDesC& aSrcDbName, const TDesC& aDestDbName, TUid aPolicyUid); IMPORT_C TInt DeleteDatabase(const TDesC& aDbName, TUid aPolicyUid); IMPORT_C TInt GetDatabasePolicy(TUid aPolicyUid, TPolicyType aPolicyType, TSecurityPolicy& aDbPolicy); IMPORT_C TInt GetTablePolicy(TUid aPolicyUid, const TDesC& aTableName, TPolicyType aPolicyType, TSecurityPolicy& aTablePolicy); IMPORT_C TInt GetTablePolicies(TUid aPolicyUid, const TDesC& aTableName, TPolicyType aPolicyType, TSecurityPolicy& aDbPolicy, TSecurityPolicy& aTablePolicy); IMPORT_C void ResourceMark(); IMPORT_C void ResourceCheck(); IMPORT_C TInt ResourceCount(); IMPORT_C void SetHeapFailure(TInt aTAllocFail,TInt aRate); IMPORT_C TInt ReserveDriveSpace(TInt aDriveNo, TInt aSpace); IMPORT_C void FreeReservedSpace(TInt aDriveNo); IMPORT_C TInt GetReserveAccess(TInt aDriveNo); IMPORT_C TInt ReleaseReserveAccess(TInt aDriveNo); IMPORT_C TInt GetBackupPath(TSecureId aRequesterSid, const TDesC& aDbName, TUid aDbPolicyUid, TDes& aBackupPath); IMPORT_C CDbStrings* BackupPathsL(TSecureId aRequesterSid, TUid aDbPolicyUid);private: TInt DoConnect(); TInt SessionMessage(TInt aFunction); TInt GetPolicy(TUid aPolicyUid, const TDesC& aTableName, TUint aMask, TSecurityPolicy& aPolicy); };class RDbNamedDatabase : public RDbDatabase {public: enum TAccess { EReadWrite, EReadOnly };public: IMPORT_C TInt Create(RDbs& aDbs, const TDesC& aDatabase, const TDesC& aFormat); IMPORT_C TInt Create(RFs& aFs,const TDesC& aDatabase,const TDesC& aFormat=TPtrC()); IMPORT_C TInt Replace(RFs& aFs,const TDesC& aDatabase,const TDesC& aFormat=TPtrC()); IMPORT_C TInt Open(RFs& aFs,const TDesC& aDatabase,const TDesC& aFormat=TPtrC(),TAccess aMode=EReadWrite); IMPORT_C TInt Open(RDbs& aDbs,const TDesC& aDatabase,const TDesC& aFormat=TPtrC()); };class RDbStoreDatabase : public RDbDatabase {public: IMPORT_C TStreamId CreateL(CStreamStore* aStore); IMPORT_C void OpenL(CStreamStore* aStore,TStreamId anId); IMPORT_C static void CompressL(CStreamStore& aStore,TStreamId aId); IMPORT_C static void DecompressL(CStreamStore& aStore,TStreamId aId); };# 1 "X:/epoc32/include/d32dbms.inl" 1inline TDbCol::TDbCol(const TDesC &aName) : iName(aName) { }inline TDbCol::TDbCol(const TDbCol& aSrcCol) : iType(aSrcCol.iType), iMaxLength(aSrcCol.iMaxLength), iAttributes(aSrcCol.iAttributes), iName(static_cast <const TDesC&>aSrcCol.iName)) { } inline TDbCol& TDbCol::operator=(const TDbCol& aSrcCol) { iType = aSrcCol.iType; iMaxLength = aSrcCol.iMaxLength; iAttributes = aSrcCol.iAttributes; iName = static_cast <const TDesC&>aSrcCol.iName); return *this; }inline TBool TDbCol::IsLong(TDbColType aType) { return aType>=EDbColLongText8; }inline TInt CDbColSet::Count() const { return iColumns.Count(); }inline void CDbColSet::Clear() { iColumns.Reset(); }inline const TDbCol& CDbColSet::operator[](TDbColNo aCol) const { return iColumns[aCol-1]; }inline TDbColSetIter::operator TAny* () const { return (const_cast< TDbCol* > iColumn )); }inline const TDbCol& TDbColSetIter::operator*() const { ; return *iColumn; }inline const TDbCol* TDbColSetIter::operator->) const { ; return iColumn; }inline TDbColNo TDbColSetIter::Col() const { ; return iIndex+1; }inline TDbColSetIter TDbColSetIter::operator++(TInt) { TDbColSetIter tmp(*this); ++(*this); return tmp; }inline TDbKeyCol::TDbKeyCol(const TDbKeyCol& aSrcKeyCol) : iOrder(aSrcKeyCol.iOrder), iLength(aSrcKeyCol.iLength), iName(static_cast <const TDesC&>aSrcKeyCol.iName)) { } inline TDbKeyCol& TDbKeyCol::operator=(const TDbKeyCol& aSrcKeyCol) { iOrder = aSrcKeyCol.iOrder; iLength = aSrcKeyCol.iLength; iName = static_cast <const TDesC&>aSrcKeyCol.iName); return *this; }inline TInt CDbKey::Count() const { return iKeys.Count(); }inline const TDbKeyCol& CDbKey::operator[](TInt aCol) const { return iKeys[aCol]; }inline void CDbKey::MakeUnique() { iAttributes|=EUnique; }inline TBool CDbKey::IsUnique() const { return iAttributes&EUnique; }inline TBool CDbKey::IsPrimary() const { return iAttributes&EPrimary; }inline void CDbKey::SetComparison(TDbTextComparison aComparison) { iComparison=aComparison; }inline TDbTextComparison CDbKey::Comparison() const { return iComparison; }inline void CDbKey::MakePrimary() { iAttributes|=EPrimary; }inline TDbQuery::TDbQuery(const TDesC& aQuery,TDbTextComparison aComparison): iQuery(aQuery), iComparison(aComparison) { }inline const TDesC& TDbQuery::Query() const { return iQuery; }inline TDbTextComparison TDbQuery::Comparison() const { return iComparison; }inline RDbHandleBase::RDbHandleBase(): iObject(0) { }inline void RDbRowSet::BeginningL() { GotoL(EBeginning); }inline void RDbRowSet::EndL() { GotoL(EEnd); }inline TBool RDbRowSet::FirstL() { return GotoL(EFirst); }inline TBool RDbRowSet::LastL() { return GotoL(ELast); }inline TBool RDbRowSet::NextL() { return GotoL(ENext); }inline TBool RDbRowSet::PreviousL() { return GotoL(EPrevious); }inline TBool RDbRowSet::IsColNull(TDbColNo aCol) const { return ColSize(aCol)==0; }inline TInt RDbRowSet::ColInt(TDbColNo aCol) const { return ColInt32(aCol); }inline TUint RDbRowSet::ColUint(TDbColNo aCol) const { return ColUint32(aCol); }inline TReal RDbRowSet::ColReal(TDbColNo aCol) const { return ColReal64(aCol); }inline void RDbRowSet::SetColL(TDbColNo aCol,TInt aValue) { SetColL(aCol, TInt32(aValue)); }inline void RDbRowSet::SetColL(TDbColNo aCol,TUint aValue) { SetColL(aCol,TUint32(aValue)); }inline TDbWindow::TDbWindow(): iSize(ENone) { }inline TDbWindow::TDbWindow(TUnlimited): iSize(EUnlimited) { }inline TInt TDbWindow::Size() const { return iSize; }inline TInt TDbWindow::PreferredPos() const { return iPreferredPos; }template <class T>inline TUnion<T>::operator const T&() const { return *(const T*)&iRep[0]; }template <class T>inline const T& TUnion<T>::operator()() const { return *(const T*)&iRep[0]; }template <class T>inline T& TUnion<T>::operator()() { return *(T*)&iRep[0]; }template <class T>inline void TUnion<T>::Set(const T& aT) { new(&iRep[0]) T(aT); }inline TDbLookupKey::TDbLookupKey(): iCount(0) { }inline TInt TDbLookupKey::Count() const { return iCount; }inline const TDbLookupKey::SColumn* TDbLookupKey::First() const { return &iKey[0]; }inline TDbSeekKey::TDbSeekKey(): iMaxKeys(1) { }inline TDbSeekKey::TDbSeekKey(TInt aKey): iMaxKeys(1) { Add(aKey); }inline TDbSeekKey::TDbSeekKey(TUint aKey): iMaxKeys(1) { Add(aKey); }inline TDbSeekKey::TDbSeekKey(TInt64 aKey): iMaxKeys(1) { Add(aKey); }inline TDbSeekKey::TDbSeekKey(TReal32 aKey): iMaxKeys(1) { Add(aKey); }inline TDbSeekKey::TDbSeekKey(TReal64 aKey): iMaxKeys(1) { Add(aKey); }inline TDbSeekKey::TDbSeekKey(TTime aKey): iMaxKeys(1) { Add(aKey); }inline TDbSeekKey::TDbSeekKey(const TDesC8& aKey): iMaxKeys(1) { Add(aKey); }inline TDbSeekKey::TDbSeekKey(const TDesC16& aKey): iMaxKeys(1) { Add(aKey); }inline TDbSeekKey::TDbSeekKey(TInt aKeys,TInt): iMaxKeys(aKeys) { }template <TInt S>inline TDbSeekMultiKey<S>::TDbSeekMultiKey(): TDbSeekKey(S,0) { }inline TInt RDbTable::SetIndex(const TDesC& anIndex) { return SetIndex(&anIndex); }inline TInt RDbTable::SetNoIndex() { return SetIndex(0); }inline RDbColWriteStream::RDbColWriteStream(const MExternalizer<TStreamRef> &anExternalizer): RWriteStream(anExternalizer) { }inline TInt CDbNames::Count() const { return iList.Count(); }inline const TDesC& CDbNames::operator[](TInt anIndex) const { return iList[anIndex]; }inline TInt RDbDatabase::CreateTable(const TDesC& aName,const CDbColSet& aColSet) { return CreateTable(aName,aColSet,NULL); }inline TInt RDbDatabase::CreateTable(const TDesC& aName,const CDbColSet& aColSet,const CDbKey& aPrimaryKey) { return CreateTable(aName,aColSet,&aPrimaryKey); }inline TInt RDbIncremental::Execute(RDbDatabase& aDatabase,const TDesC& aSql,TInt& aStep) { return Execute(aDatabase,aSql,EDbCompareNormal,aStep); }inline TInt CDbStrings::Count() const { return iList.Count(); }inline const TDesC& CDbStrings::operator[](TInt aIndex) const { return iList[aIndex]; }# 1485 "X:/epoc32/include/d32dbms.h" 2# 25 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpcontentdirectorydb.h" 2# 1 "X:/epoc32/include/flogger.h" 1#define __FLOGGER_H__const TInt KLogBufferSize=150;class FLogger {public: class TSignal { friend class FLogger; public: inline TSignal() {} inline TInt Set(const TDesC& aCommand); inline TSignal(TRequestStatus& aStatus); inline TPtrC Command() const; private: TRequestStatus* iStatus; TThreadId iId; };public: static TInt Start(); IMPORT_C static TInt Run(TSignal& aSignal);private: static TInt Init(); };enum TFileLoggingMode { EFileLoggingModeUnknown =0, EFileLoggingModeAppend, EFileLoggingModeOverwrite, EFileLoggingModeAppendRaw, EFileLoggingModeOverwriteRaw };class TLogFormatter16Overflow :public TDes16Overflow {public: virtual void Overflow(TDes16& aDes); };class TLogFormatter8Overflow :public TDes8Overflow {public: virtual void Overflow(TDes8& aDes); };class TLogFormatter {public: TLogFormatter(); void SetDateAndTime(TBool aUseDate,TBool aUseTime); TInt FormatTextToWritableBuffer(TDes8& aBuf, const TDesC16& aText) const; TInt FormatTextToWritableBuffer(TDes8& aBuf, const TDesC8& aText) const; TInt ConvertToWritableBuffer(TDes8& aBuf, TRefByValue<const TDesC16> aFmt, VA_LIST& aList); TInt ConvertToWritableBuffer(TDes8& aBuf, TRefByValue<const TDesC8> aFmt, VA_LIST& aList);private: void GetDateAndTimeL(TDes& aDate, TDes& aTime) const; void WriteL(TDes8& aTrg, const TDesC16& aSrc) const; void WriteL(TDes8& aTrg, const TDesC8& aSrc) const;private: TBool iUseDate; TBool iUseTime; TLogFormatter16Overflow iOverflow16; TLogFormatter8Overflow iOverflow8; };class TLogFile {public: TLogFile(); TLogFile(const TDesC& aDir, const TDesC& aName, TFileLoggingMode aMode); TBool operator==(const TLogFile& aLogFile) const; void Set(const TDesC& aDir, const TDesC& aName, TFileLoggingMode aMode); inline TBool Valid() const; inline TFileName Directory() const; inline TFileName Name() const; inline TFileLoggingMode Mode() const; inline void SetValid(TBool aValid);private: TBool iValid; TFileName iDirectory; TFileName iName; TFileLoggingMode iMode; };# 1 "X:/epoc32/include/flogger.inl" 1#define __FLOGGER_INL__inline FLogger::TSignal::TSignal(TRequestStatus& aStatus) :iStatus(&aStatus),iId(RThread().Id()) { aStatus=KRequestPending; }inline TPtrC FLogger::TSignal::Command() const { return TPtrC((const TText*)this,sizeof(*this)/sizeof(TText)); }inline TInt FLogger::TSignal::Set(const TDesC& aCommand) { if (aCommand.Size()!=sizeof(*this)) return KErrGeneral; return (Mem::Copy(this,aCommand.Ptr(),sizeof(*this)),KErrNone); }inline TBool TLogFile::Valid() const { return iValid; }inline TFileName TLogFile::Directory() const { return iDirectory; } inline TFileName TLogFile::Name() const { return iName; }inline TFileLoggingMode TLogFile::Mode() const { return iMode; } inline void TLogFile::SetValid(TBool aValid) { iValid=aValid; }# 156 "X:/epoc32/include/flogger.h" 2class RFileLogger : public RSessionBase {public: IMPORT_C RFileLogger(); IMPORT_C ~RFileLogger(); IMPORT_C TVersion Version() const; IMPORT_C TInt Connect(); IMPORT_C void SetDateAndTime(TBool aUseDate,TBool aUseTime); IMPORT_C void CreateLog(const TDesC& aDir, const TDesC& aName, TFileLoggingMode aMode); IMPORT_C void CloseLog(); IMPORT_C void Write(const TDesC16& aText); IMPORT_C void WriteFormat(TRefByValue<const TDesC16> aFmt,...); IMPORT_C void WriteFormat(TRefByValue<const TDesC16> aFmt, VA_LIST& aList); IMPORT_C void Write(const TDesC8& aText); IMPORT_C void WriteFormat(TRefByValue<const TDesC8> aFmt,...); IMPORT_C void WriteFormat(TRefByValue<const TDesC8> aFmt, VA_LIST& aList); IMPORT_C void HexDump(const TText* aHeader, const TText* aMargin, const TUint8* aPtr, TInt aLen); IMPORT_C static void Write(const TDesC& aDir, const TDesC& aName, TFileLoggingMode aMode, const TDesC16& aText); IMPORT_C static void WriteFormat(const TDesC& aDir, const TDesC& aName, TFileLoggingMode aMode, TRefByValue<const TDesC16> aFmt,...); IMPORT_C static void WriteFormat(const TDesC& aDir, const TDesC& aName, TFileLoggingMode aMode, TRefByValue<const TDesC16> aFmt, VA_LIST& aList); IMPORT_C static void Write(const TDesC& aDir, const TDesC& aName, TFileLoggingMode aMode, const TDesC8& aText); IMPORT_C static void WriteFormat(const TDesC& aDir, const TDesC& aName, TFileLoggingMode aMode, TRefByValue<const TDesC8> aFmt,...); IMPORT_C static void WriteFormat(const TDesC& aDir, const TDesC& aName, TFileLoggingMode aMode, TRefByValue<const TDesC8> aFmt, VA_LIST& aList); IMPORT_C static void HexDump(const TDesC& aDir, const TDesC& aName, TFileLoggingMode aMode, const TText* aHeader, const TText* aMargin, const TUint8* aPtr, TInt aLen); IMPORT_C TInt LastError() const; IMPORT_C TBool LogValid() const; IMPORT_C TBool LogSTI() const;private: TInt DoConnect(); void DoWrite(const TDesC8& aBuf); void DoStaticWrite(const TDesC8& aBuf); void DoWriteFormat(TRefByValue<const TDesC16> aFmt, VA_LIST& aList); void DoWriteFormat(TRefByValue<const TDesC8> aFmt, VA_LIST& aList); static void DoStaticWriteFormat(const TDesC& aDir, const TDesC& aName, TFileLoggingMode aMode, TRefByValue<const TDesC16> aFmt, VA_LIST& aList); static void DoStaticWriteFormat(const TDesC& aDir, const TDesC& aName, TFileLoggingMode aMode, TRefByValue<const TDesC8> aFmt, VA_LIST& aList); void DoHexDump(const TText* aHeader, const TText* aMargin, const TUint8* aPtr, TInt aLen);private: TLogFormatter iFormatter; TLogFile iLogFile; TInt iLastError; TBool iLogSTI; };# 27 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpcontentdirectorydb.h" 2class CUpnpElementBean;class CUpnpFilterElement;class CUpnpAttributeBean;class CUpnpObjectBean;class CUpnpDlnaProtocolInfo;class CUpnpShareMapBean;class CUpnpResourcesBean;class CUpnpMetadataStorage;class CUpnpContentDirectoryDb : public CBase{ public: static CUpnpContentDirectoryDb* NewLC(CUpnpMetadataStorage* aMetadataStorage); static CUpnpContentDirectoryDb* NewL(CUpnpMetadataStorage* aMetadataStorage); ~CUpnpContentDirectoryDb(); public: TUpnpErrorCode CheckObjectRestrictionL(TInt aObjId); TUpnpErrorCode InsertObjectL( RXmlEngDocument& aFragment, TInt aContainer, TInt* aId); TUpnpErrorCode GetObjectL( TInt aObjectID, RXmlEngDocument& aDoc, const TDesC8& aFilterString); TInt ReferedObjectIdL( TInt aObjectId ); TUpnpErrorCode GetObjectListL(TInt aParentId, RArray<TInt>& aList); TUpnpErrorCode DeleteObjectL(TInt aObjId,RArray<TInt>& aRefList, TBool aDeleteResource=ETrue); TUpnpErrorCode UpdateObjectL(TInt aObjId, RXmlEngDocument& aFragment); void DeleteResourceL(const TDesC8& aResVal, RArray<TInt>& aContIds); TUpnpErrorCode GetObjectByAttrL(RXmlEngDocument& aDoc, TInt* aObjId, const TDesC8& aAttrName, const TDesC8& aAttrVal); TUpnpErrorCode CheckParentRestrictionL(TInt aObjId); TInt GetObjIdByAttrL(const TDesC8& aAttrName, const TDesC8& aAttrVal); TInt GetObjIdByAttrLikeL(const TDesC8& aAttrName, const TDesC8& aAttrVal); RXmlEngDocument PrepareDidlDocumentL(); TInt GetProtocolInfoL(const TDesC8& aContentUri, CUpnpDlnaProtocolInfo*& aProtocolInfo); void GetObjectListL(const RArray<TInt>& aIds, const TDesC8& aFilter, RArray<RXmlEngDocument>& aObjs); TBool CanBeNestedL(TInt aObjId); void AddResourceL(CUpnpResourcesBean* aResBean, TInt aObjId); void DeleteResourceByResIdL(TInt64 aResId, TBool aDeleteFile = ETrue); void DeleteResourceByObjIdL(TInt aObjId, TBool aDeleteFile = ETrue); void NewMediaDirectoryL(const TDesC& aOldDir); CUpnpResourcesBean* GetResourceL(TInt64 aResId); CUpnpAttributeBean* GetAttrByNameL(TInt aElmId, const TDesC8& aAttrName, HBufC8*& aAttrVal); CUpnpAttributeBean* GetAttrByValueL(const TDesC8& aAttrName, const TDesC8& aAttrVal); HBufC8* GetProtocolInfoByImportUriL(const TDesC8& aImportUri); TInt GetKeyForUriL(); TInt GetObjectIdByElementValueLikeL(const TDesC8& aElmName, const TDesC8& aElmValue); TInt GetParentIdL(TInt aObjectId); TInt GetObjectIdL(); HBufC8* GetObjectTitleL(TInt aId); void CheckDatabaseL(); TInt HandleDbError( TInt aError ); TInt RecreateDatabaseFile(); TBool IsDbCreated(); private: CUpnpObjectBean* GetObjBeanLC(TInt aObjId); void GetObjectsByResourceL(RArray<TInt>& aIds, const TDesC& aResVal); TInt GetElmIdByNameAndValL(const TDesC& aElmName, const TDesC& aElmValue); void GetAttrValueByNameL(TInt aElmId, const TDesC8& aAttrName, HBufC8*& aAttrVal); void DeleteResourcesL(TInt aObjId); void DoDeleteResourceL(const TDesC8& aResVal, RArray<TInt>& aContIds); void SetChildCountL(TXmlEngElement aElement, TInt aId); void AddAllPropertiesL(TXmlEngElement aElement, CUpnpObjectBean* aObjBean); void AddAttributeL( TXmlEngElement aElement, const TDesC8& aAttrName, TInt aElementId, TInt aObjectId ); TUpnpErrorCode AddRequestedPropertiesL(TInt aObjectID,TXmlEngElement aElement, const RPointerArray<CUpnpFilterElement>& aFilterElements); void AddElementL(TXmlEngElement aElement, TInt aObjectID, const CUpnpFilterElement* aReqElement); TUpnpErrorCode AddRequiredPropertyL(TXmlEngElement aElement, TInt aObjId, CUpnpFilterElement* aFilterElement); void ParseFilterStringL(const TDesC8& aFilter, RPointerArray<CUpnpFilterElement>& aList); TUpnpErrorCode DoGetObjectL(TInt aObjectID, RXmlEngDocument& aDoc, TBool aAll); TUpnpErrorCode InsertElementL(const TXmlEngElement& aElementel, TInt aObjId); TUpnpErrorCode DoUpdateObjectL(TInt aObjId, TXmlEngElement aFragment); TUpnpErrorCode InsertUpdatedL(TInt aObjId, TXmlEngElement& aElement); TInt SetObjectIdL(TXmlEngElement& aElement); TUpnpErrorCode DoInsertObjectL( TXmlEngElement& aElement, TInt aContainerId, TInt* aId); TUpnpErrorCode InsertAttributesL(const TXmlEngElement aElement, TInt aElmId,TInt aObjId); TBool IsAttrRequiredL(const TXmlEngAttr& aAttr, RArray<TXmlEngAttr>& aMarkers); CUpnpContentDirectoryDb(CUpnpMetadataStorage* aMetadataStorage); void ConstructL(); void ConstructDbL(const TFileName& aDatabaseFileName); void OpenDbL( const TFileName& aDatabaseFileName ); void AddElementsL( TInt aObjectID, TXmlEngElement aObjectElement, TBool aAll ); void AddAttributesL( TInt aElementID, TInt aObjectID, TXmlEngElement& aElement, TBool aAll ); private: CUpnpMetadataStorage* iMetadataStorage; RXmlEngDOMImplementation iDOMImpl; };# 43 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpfiletransfertimerobserver.h" 1#define C_CUPNPFILETRANSFERTIMEROBSERVER_Hclass CUpnpContentDirectory;class MUpnpContentDirectoryEventObserver;class CUpnpFileTransferTimerObserver;const TInt KFileTransferStorageTime = 30000000;class MUpnpFileTransferTimerObserver {public: virtual void TransferEvent( CUpnpFileTransferTimerObserver* aTimer ) = 0; };class CUpnpFileTransferTimerObserver : public CBase, public MUpnpNotifyTimerObserver{public: static CUpnpFileTransferTimerObserver* NewLC( MUpnpFileTransferTimerObserver* aCd, TInt aTransferId); virtual ~CUpnpFileTransferTimerObserver();private: CUpnpFileTransferTimerObserver( MUpnpFileTransferTimerObserver* aCd, TInt aTransferId ); void ConstructL();public: void TimerEventL( CUpnpNotifyTimer* aTimer ); TInt TransferId(); private: MUpnpFileTransferTimerObserver* iCd; CUpnpNotifyTimer* iEventTimer; TInt iTransferId; }; # 44 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnperror.h" 1#define C_TUPNPERROR_Hclass TUpnpError{public: TUpnpError(TInt aErrCode); operator TUpnpErrorCode(); private: TUpnpErrorCode iUpnpErrCode;}; # 45 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/inc/upnpcustomlog.h" 1#define C_UPNPCUSTOMLOG_H #define UPNP_LOGconst static TLitC<sizeof(L"upnp" )/2> KLogFolder ={sizeof(L"upnp" )/2-1,L"upnp" };const TInt KMaxLogLen = 256; #define LOGT(A)#define LOGS(A)#define LOGS1(A,B)#define LOGS2(A,B,C)#define LOGM#define ACTIONSEND(A)#define ACTIONRECV(A,B)#define LOGTH(H,A)#define LOGSH(H,A)#define LOGS1H(H,A,B)#define LOGS2H(H,A,B,C)#define LOGCD(A,B,C,D)#define LOGSQL(A,B,C,D)#define LOGTIME#define LOG(x)#define LOG8(x)#define LOG16(x)#define LOG_FUNC_NAME# 46 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpresourcesbean.h" 1#define UPNPRESOURCESBEAN_H# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnptablebean.h" 1#define C_CUPNPTABLEBEAN_Hclass CUpnpTableBean : public CBase{ public: static const TInt KUndef = -1; protected: virtual ~CUpnpTableBean(); CUpnpTableBean(); HBufC8* ReadLongTextColL(const RDbRowSet& aRowSet, const TInt aColNo);}; # 23 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpresourcesbean.h" 2class CUpnpElement;class CUpnpResourcesBean: public CUpnpTableBean { public: static CUpnpResourcesBean* NewLC(); static CUpnpResourcesBean* NewL(const RDbRowSet& aRowSet); static CUpnpResourcesBean* NewLC(const RDbRowSet& aRowSet); virtual ~CUpnpResourcesBean(); public: void SetL(const RDbRowSet& aRowSet); void SetId(TInt64 aId); void SetObjectId(TInt aObjectId); void SetPathL(const TDesC& aPath); void SetPathL(const TDesC8& aPath); void SetIsReadonly(TBool aIsReadonly); void SetIsThumbnail(TBool aIsThumbnail); TInt64 Id() const; TInt ObjectId() const; TDesC& Path() const; TInt IsReadonly() const; TInt IsThumbnail() const; private: CUpnpResourcesBean(); void ConstructL(); private: TInt64 iId; TInt iObjectId; HBufC* iPath; TInt iIsReadonly; TInt iIsThumbnail;};# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpresourcesbean.inl" 1inline void CUpnpResourcesBean::SetId(TInt64 aId){ iId = aId;}inline void CUpnpResourcesBean::SetObjectId(TInt aObjectId){ iObjectId = aObjectId;}inline void CUpnpResourcesBean::SetIsReadonly(TBool aIsReadonly){ iIsReadonly = aIsReadonly;}inline void CUpnpResourcesBean::SetIsThumbnail(TBool aIsThumbnail){ iIsThumbnail = aIsThumbnail;}inline TInt64 CUpnpResourcesBean::Id() const{ return iId;}inline TInt CUpnpResourcesBean::ObjectId() const{ return iObjectId;}inline TDesC& CUpnpResourcesBean::Path() const{ return *iPath;}inline TInt CUpnpResourcesBean::IsReadonly() const{ return iIsReadonly;}inline TInt CUpnpResourcesBean::IsThumbnail() const{ return iIsThumbnail;}# 158 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpresourcesbean.h" 2# 49 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpcdutils.h" 1#define CDUTILS_Hclass UpnpCdUtils{ public: static void ValidateFilePath(TDes8& aPath); static void ValidateFilePath(TDes& aPath); static void ValidateSrcUriL(TDesC8& aPath,TDesC8& aIp); static void RemoveWhiteSpacesL(TDes8& aString); static TBool IsWhiteString(const TDesC8& aString); static TXmlEngElement GetObjectElementL(RXmlEngDocument& aFragment); static TBool HasRefIdL( RXmlEngDocument& aFragment ); static HBufC8* EncodeXmlStringL(const TDesC8& aString); static HBufC* Des8ToDesL(const TDesC8& aString); static HBufC* Des8ToDesLC(const TDesC8& aString); static HBufC8* DesToDes8LC(const TDesC& aString); static TInt64 ResIdFromUriL(const TDesC8& aUri); static TPtrC8 ResIdFromUriDesL(const TDesC8& aUri); static void SetObjectIdL(TXmlEngElement aElement, TInt aId); static void SetObjectRefIdL(TXmlEngElement aElement, TInt aRefId); static void SetObjectParentIdL(TXmlEngElement aElement, TInt aParentId); static void SetRestrictedFieldL( TXmlEngElement aElement, TBool aRestrictedFlag ); static void SetContainerIdL(TXmlEngElement aElement, TInt aParentId); static HBufC8* BuildImportUriLC(TInt aResId); static HBufC8* BuildImportUriShorterLC(TInt64 aResId); static HBufC8* BuildContentUriL(TInt aResId, const TDesC& aFileExten, TDesC8& aObjectId); static HBufC8* UpnpCdUtils::RandomizeL(TInt aRange); static TBool IsElementRequiredL(TXmlEngElement aElement); static void ReplaceTrueFalse(HBufC8* aBuf); static HBufC8* GetElmNameWithNsL(TXmlEngElement aElement); static HBufC* EscapeAposL(const TDesC& aValue); static TBool ValidateDateL( TPtrC8 aValue ); static TInt StringToTUint(const TDesC8& aStr, TUint* aInt); static TBool AreDigitsInSpecificRange(const TDesC8& aInput, TInt aNumber, TBool aExactDigitsNumber, TUint32 aRange); static TBool ValidateDurationValue(const TDesC8& aInput); static void SplitStringByDelimeter(TLex8& aLexeme, TChar aDelimeter); static void Skip(TLex8& aLexer, TInt aValue); static TInt StringToInteger(const TDesC8& aStr, TInt* aInt); private: enum TPlaces { EYear = 4, EMonth = 7, EDay = 10, EHour = 13, EMinute = 16, ESecond = 19, EZone1 = 20, EHourOffset1 = 22, EMiliSecond = 23, EZone2 = 24, ETimeOffset1 = 25, EHourOffset2 = 26, ETimeOffset2 = 29 }; UpnpCdUtils();}; # 50 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpmetadatastorage.h" 1#define UPNPMETADATASTORAGE_Hclass CUpnpObjectBean;class CUpnpElementBean;class CUpnpAttributeBean;class CUpnpResourcesBean;class CUpnpMetadataStorage : public CBase{public: static CUpnpMetadataStorage* NewL(const TDesC& aDatabaseFileName); static CUpnpMetadataStorage* NewLC(const TDesC& aDatabaseFileName); virtual ~CUpnpMetadataStorage();public: TBool IsContainerL(TInt aObjId); void DeleteResourcesL(RArray<TInt>& aObjList); void AddResourceL(CUpnpResourcesBean* aResBean, TInt aObjId); TUpnpErrorCode DoDeleteObjectL(TInt aObjId, TBool aDeleteResource, TBool aDeleteRef=ETrue ); void InsertIntoAttributeTableL(TInt aElmId, CUpnpAttributeBean* aAtrBn, TInt aObjId, TInt aAtrId); TInt InsertIntoElementTableL(TInt aObjId, CUpnpElementBean* aElmBn, TInt aElmId); TInt InsertIntoObjectTableL(TInt aContainer, CUpnpObjectBean* aObjBn); RDbView GetObjViewL(TInt aObjId); void BeginTransactionL(); void CommitTransactionL(); void RollbackTransactionL(); RDbView GetElementsViewL(TInt aObjectID, TBool aAll); RDbView GetAttributesViewL(TInt aElementID, TBool aAll); RDbView GetAttributesViewByObjectIdL( TInt aObjectID, TBool aAll ); TInt GetElmIdForAttrL(const TDesC8& aAttrName, const TDesC8& aAttrVal); TInt GetElmIdForAttrLikeL(const TDesC8& aAttrName, const TDesC8& aAttrVal); void DeleteResElL(const TDesC& aResVal, TInt ObjId); RDbView GetViewOfObjectListForResL(const TDesC& aResVal); RDbView GetViewOfElmIdByNameAndValL(const TDesC& aElmName, const TDesC& aElmValue); RDbView GetAttrViewL(const TDesC8& aAttrName, const TDesC8& aAttrVal); RDbView GetAttrViewL(TInt aElmId, const TDesC8& aAttrName); RDbView GetAttrViewByObjectIdL(TInt aBjectId, const TDesC8& aAttrName); RDbView PrepareViewL(const TDesC& aSqlQuery); RDbView GetEvaluatedViewL(const TDesC& aSqlQuery); HBufC8* GetObjectPathL(TInt aObjId); HBufC8* GetObjectTitleL(TInt aObjId); void ExecuteL(const TDesC& aSqlCommand); CUpnpResourcesBean* GetResourceL(TInt64 aResId); void DeleteResourceByObjIdL(TInt aObjId, TBool aDeleteFile=ETrue); void DeleteResourceByResIdL(TInt64 aResId, TBool aDeleteFile=ETrue); void DeleteObjectsL(TInt aObjId); void DeleteElementsL(TInt aObjId); void DeleteAttributesL(TInt aObjId); void DeleteReferencesL(TInt aObjId,RArray<TInt>& aRefList); TInt DoDeleteObjectL(TInt aObjId,RArray<TInt>& aRefList, RArray<TInt>& aResList, TBool aDeleteResource, TBool aLocal, TBool aDeleteRef = ETrue ); TUpnpErrorCode CheckParentRestrictionL(TInt aObjId); TUpnpErrorCode DeleteObjectL(TInt aObjId,RArray<TInt>& aRefList, TBool aDeleteResource, TBool aLocal = EFalse, TBool aDeleteRef = ETrue ); HBufC8* GetColDesValFromRowSetL(RDbRowSet aRowset, TDbColNo aColNo); TInt GetChildCountL(TInt aObjId); TInt GetParentIdL(TInt aObjId); TInt GetObjIdForElmIdL(TInt aId); TInt ReferedObjectIdL( TInt aObjectId ); TInt GetNextKeyL(const TDesC8& aName); TInt GetNextKeyL(const TDesC8& aName, TInt aAmount); TInt NextKeyL(const TDesC8& aName); void InsertObjectIntoObjectTableL(const TXmlEngElement& aElement); void InsertAttributeL(const TXmlEngAttr aAttr, TInt aElmId, TBool aIsRequired, TInt aObjId); TInt InsertElementL(const TXmlEngElement& aElementel, TInt aObjId); RDbView GetElementViewL(TInt aObjId, const TDesC8& aElName); TUpnpErrorCode AddMainTagAttrL(TXmlEngElement aElement, TInt aId, const TDesC8& aName); TUpnpErrorCode GetObjectListL(TInt aParentId, RArray<TInt>& aList); TUpnpErrorCode GetItemListL(TInt aParentId, RArray<TInt>& aList); TUpnpErrorCode GetContainerListL(TInt aParentId, RArray<TInt>& aList); TUpnpErrorCode CheckObjectRestrictionL(TInt aObjId); TInt RecoverDatabase(); void RecreateDatabaseFileL(); void CheckDatabaseL(); TInt HandleDbError( TInt aError ); TBool IsDbCreated(); private: CUpnpMetadataStorage(); void ConstructL(const TDesC& aDatabaseFileName);private: void CompactDbL(); TInt AddSubObjectsL(TInt aObjId, RArray<TInt>& aObjList, RArray<TInt>& aResList, TBool aLocal); void CompareDbColSetsL( CDbColSet *aColSet1, CDbColSet *aColSet2 ); void DeleteFileL(const TDesC& aPath); HBufC8* CreatePathValL(const TXmlEngElement& aElement); HBufC8* CreatePathValL(TInt aParentId); void OpenDbL( const TFileName& aDatabaseFileName ); void DbChangedL(TInt aWeight);private: RFs iFsSession; RDbStoreDatabase iDatabase; TBool iIsOpen; CFileStore* iFileStore; TInt iCompactCounter;}; # 51 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpautodestroyobjectlist.h" 1#define C_CUPNPAUTODESTROYOBJECTLIST_Hclass CUpnpAutoDestroyObject;class CUpnpAutoDestroyObjectList: public CBase{public: static CUpnpAutoDestroyObjectList* NewL(); static CUpnpAutoDestroyObjectList* NewLC(); virtual ~CUpnpAutoDestroyObjectList();public: void AppendL(const CUpnpAutoDestroyObject* aObj); void RemoveAndDestroyL(TInt aIndex); TInt FindObjIndexByObjId(TInt aObjId); TInt FindObjIndexByResId(TInt aResId); CUpnpAutoDestroyObject* operator[](TInt aIndex); void TransferFailL(TInt aResId); TInt Count();private: CUpnpAutoDestroyObjectList(); void ConstructL();private:private: RPointerArray<CUpnpAutoDestroyObject> iArray;}; # 52 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpautodestroyobject.h" 1#define C_CUPNPAUTODESTROYOBJECT_Hclass CUpnpContentDirectory;class CUpnpNotifyTimer;class CUpnpAutoDestroyObject: public CBase, public MUpnpNotifyTimerObserver{public: static CUpnpAutoDestroyObject* NewL(CUpnpContentDirectory* aCd, TInt aObjId, TInt aResId ); static CUpnpAutoDestroyObject* NewLC(CUpnpContentDirectory* aCd, TInt aObjId, TInt aResId ); virtual ~CUpnpAutoDestroyObject();public: virtual void TimerEventL(CUpnpNotifyTimer* aTimer); TInt GetResId(); TInt GetObjId(); void SetTransferStartedL(TBool aVal); void RenewTimerL(); private: CUpnpAutoDestroyObject(CUpnpContentDirectory* aCd, TInt aObjId, TInt aResId); void ConstructL();private: CUpnpContentDirectory* iCd; CUpnpNotifyTimer* iEventTimer; TInt iResId; TInt iObjectId; TBool iTransferStarted; TBool iTimeElapsed;}; # 53 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpcontentdirectoryeventobserver.h" 1#define C_CUPNPCONTENTDIRECTORYEVENTOBSERVER_Hclass CUpnpFileTransferEvent;class MUpnpContentDirectoryEventObserver {public: virtual void FileTransferEvent(CUpnpFileTransferEvent *aMessage) = 0; };# 54 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/epoc32/include/platform/mw/upnpfiletransferevent.h" 1#define C_CUPNPFILETRANSFEREVENT_H# 1 "X:/epoc32/include/s32mem.h" 1#define __S32MEM_H__class TMemBuf : public TStreamBuf {public: IMPORT_C TMemBuf(); IMPORT_C void Set(TUint8* aPtr,TUint8* anEnd,TInt aMode=ERead|EWrite);protected: IMPORT_C TInt UnderflowL(TInt aMaxLength); IMPORT_C void OverflowL(); IMPORT_C TStreamPos DoSeekL(TMark aMark,TStreamLocation aLocation,TInt anOffset);private: inline TUint8* Base() const; inline TUint8* End() const;private: TUint8* iBase; };class TDesBuf : public TStreamBuf {public: IMPORT_C TDesBuf(); IMPORT_C void Set(TDes8& aDes,TInt aMode=ERead|EWrite);protected: IMPORT_C TInt UnderflowL(TInt aMaxLength); IMPORT_C void OverflowL(); IMPORT_C void DoSynchL(); IMPORT_C TStreamPos DoSeekL(TMark aMark,TStreamLocation aLocation,TInt anOffset);private: inline TDes8& Des() const; inline TUint8* Base() const; void Consolidate();private: TDes8* iDes; };class TBufBuf : public TStreamBuf {public: enum {ETruncate=0x10,EInsert=0x20};public: IMPORT_C TBufBuf(); IMPORT_C void Set(CBufBase& aBuf,TInt aPos,TInt aMode=ERead|EWrite);protected: IMPORT_C TInt UnderflowL(TInt aMaxLength); IMPORT_C void OverflowL(); IMPORT_C void DoSynchL(); IMPORT_C void DoWriteL(const TAny* aPtr,TInt aLength); IMPORT_C TStreamPos DoSeekL(TMark aMark,TStreamLocation aLocation,TInt anOffset);private: inline CBufBase& Buf() const; void Consolidate(); void SetPos(TMark aMark,TInt aPos); inline void SetPos(TRead,TInt aPos); inline void SetPos(TWrite,TInt aPos); TInt Pos(TMark aMark) const; inline TInt Pos(TRead) const; inline TInt Pos(TWrite) const; inline TInt MovePos(TRead,TInt anOffset); inline TInt MovePos(TWrite,TInt anOffset); inline TInt Mark(TRead) const; inline TInt Mark(TWrite) const;private: CBufBase* iBuf; TInt iRPos; TInt iWPos; TInt iMode; };class RMemReadStream : public RReadStream {public: RMemReadStream() {} IMPORT_C RMemReadStream(const TAny* aPtr,TInt aLength); IMPORT_C void Open(const TAny* aPtr,TInt aLength);private: TMemBuf iSource; };class RMemWriteStream : public RWriteStream {public: RMemWriteStream() {} inline RMemWriteStream(const MExternalizer<TStreamRef>& anExter); IMPORT_C RMemWriteStream(TAny* aPtr,TInt aMaxLength); IMPORT_C void Open(TAny* aPtr,TInt aMaxLength);private: TMemBuf iSink; };class RDesReadStream : public RReadStream {public: RDesReadStream() {} IMPORT_C RDesReadStream(const TDesC8& aDes); IMPORT_C void Open(const TDesC8& aDes);private: TMemBuf iSource; };class RDesWriteStream : public RWriteStream {public: RDesWriteStream() {} inline RDesWriteStream(const MExternalizer<TStreamRef>& anExter); IMPORT_C RDesWriteStream(TDes8& aDes); IMPORT_C void Open(TDes8& aDes);private: TDesBuf iSink; };class RBufReadStream : public RReadStream {public: RBufReadStream() {} IMPORT_C RBufReadStream(const CBufBase& aBuf,TInt aPos=0); IMPORT_C void Open(const CBufBase& aBuf,TInt aPos=0);private: TBufBuf iSource; };class RBufWriteStream : public RWriteStream {public: RBufWriteStream() {} inline RBufWriteStream(const MExternalizer<TStreamRef>& anExter); IMPORT_C RBufWriteStream(CBufBase& aBuf,TInt aPos=0); IMPORT_C void Open(CBufBase& aBuf,TInt aPos=0); IMPORT_C void Truncate(CBufBase& aBuf,TInt aPos=0); IMPORT_C void Insert(CBufBase& aBuf,TInt aPos); inline void Append(CBufBase& aBuf);private: TBufBuf iSink; };class CBufStore : public CStreamStore {public: IMPORT_C static CBufStore* NewL(TInt anExpandSize); IMPORT_C static CBufStore* NewLC(TInt anExpandSize); IMPORT_C CBufStore(TInt anExpandSize); IMPORT_C ~CBufStore();protected: IMPORT_C TStreamId DoExtendL(); IMPORT_C void DoDeleteL(TStreamId anId); IMPORT_C MStreamBuf* DoReadL(TStreamId anId) const; IMPORT_C MStreamBuf* DoCreateL(TStreamId& anId); IMPORT_C MStreamBuf* DoWriteL(TStreamId anId); IMPORT_C MStreamBuf* DoReplaceL(TStreamId anId);private: CBufSeg& BufL(TStreamId anId) const;private: CArrayFixFlat<CBufSeg*> iBufArray; TInt iExpandSize; };# 1 "X:/epoc32/include/s32mem.inl" 1inline RMemWriteStream::RMemWriteStream(const MExternalizer<TStreamRef>& anExter) : RWriteStream(anExter) {}inline RDesWriteStream::RDesWriteStream(const MExternalizer<TStreamRef>& anExter) : RWriteStream(anExter) {}inline RBufWriteStream::RBufWriteStream(const MExternalizer<TStreamRef>& anExter) : RWriteStream(anExter) {}inline void RBufWriteStream::Append(CBufBase& aBuf) {Insert(aBuf,aBuf.Size());}# 351 "X:/epoc32/include/s32mem.h" 2# 24 "X:/epoc32/include/platform/mw/upnpfiletransferevent.h" 2# 1 "X:/epoc32/include/platform/mw/upnpmediaserverevent.h" 1#define C_CUPNPMEDIASERVEREVENT_Hclass CUpnpMediaServerEvent : public CBase{public: CUpnpMediaServerEvent(TInt aType); virtual ~CUpnpMediaServerEvent(); TInt GetEventType(); virtual void InternalizeL( RReadStream& aStream ) = 0; virtual void ExternalizeL( RWriteStream& aStream ) const = 0;protected: TInt iEventType;};# 25 "X:/epoc32/include/platform/mw/upnpfiletransferevent.h" 2class CUpnpMediaServerEvent;class CUpnpFileTransferEvent : public CUpnpMediaServerEvent{public: enum TProgressState { EStarted, ECompleted, EFailed, EStopped }; enum TDirection { EIncoming, EOutgoing, }; public: IMPORT_C static CUpnpFileTransferEvent* NewL(); IMPORT_C static CUpnpFileTransferEvent* NewLC(); virtual ~CUpnpFileTransferEvent(); IMPORT_C TProgressState ProgressState(); IMPORT_C void SetProgressState( TProgressState aState ); IMPORT_C TDirection Direction(); IMPORT_C void SetDirection( TDirection aState ); IMPORT_C TInt TransferId(); IMPORT_C void SetTransferId( TInt aTransferId ); IMPORT_C TInt ContentDirectoryObjectId(); IMPORT_C void SetContentDirectoryObjectId( TInt aObjectId ); IMPORT_C TDesC& FilePath(); IMPORT_C void SetFilePathL(const TDesC& aFile); IMPORT_C TInt ErrorCode(); IMPORT_C void SetErrorCode( TInt aError ); IMPORT_C CUpnpFileTransferEvent* CloneL(); IMPORT_C void ExternalizeL( RWriteStream& aStream ) const; IMPORT_C void InternalizeL( RReadStream& aStream ); private: void ConstructL(); CUpnpFileTransferEvent(); private: TInt iProgress; TInt iDirection; TInt iContentDirectoryObjectId; HBufC* iFilePath; TInt iTransferId; TInt iErrorCode;};# 55 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/inc/upnpprotocolinfolocal.h" 1#define C_CUPNPPROTOCOLINFOLOCAL_H const static TLitC8<sizeof( "1" )> KOneChar ={sizeof( "1" )-1, "1" }; const static TLitC8<sizeof( "0" )> KZeroChar ={sizeof( "0" )-1, "0" }; const static TLitC8<sizeof( "http-get" )> KDEFAULT_1ST_PARAM ={sizeof( "http-get" )-1, "http-get" }; const static TLitC8<sizeof( "*" )> KDEFAULT_STAR_PARAM ={sizeof( "*" )-1, "*" }; const char KDlnaDelimeter = ';'; const char KDlnaTokenizer = '='; const char KDlnaAllStar = '*'; const TInt KMAX_INT_LENGTH_STRING = 8 ; const TInt KDLNA_FLAGS_NUMBER = 4; const TInt K32BIT = 32; const TInt KDLNA_FLAGS_QUANTITY = KDLNA_FLAGS_NUMBER * K32BIT; const static TLitC8<sizeof( "*" )> KAllValues ={sizeof( "*" )-1, "*" }; const static TLitC8<sizeof( "DLNA.ORG_PN" )> KDLNA_PN ={sizeof( "DLNA.ORG_PN" )-1, "DLNA.ORG_PN" }; const static TLitC8<sizeof( "DLNA.ORG_OP" )> KDLNA_OP ={sizeof( "DLNA.ORG_OP" )-1, "DLNA.ORG_OP" }; const static TLitC8<sizeof( "DLNA.ORG_PS" )> KDLNA_PS ={sizeof( "DLNA.ORG_PS" )-1, "DLNA.ORG_PS" }; const static TLitC8<sizeof( "DLNA.ORG_CI" )> KDLNA_CI ={sizeof( "DLNA.ORG_CI" )-1, "DLNA.ORG_CI" }; const static TLitC8<sizeof( "DLNA.ORG_FLAGS" )> KDLNA_FLAGS ={sizeof( "DLNA.ORG_FLAGS" )-1, "DLNA.ORG_FLAGS" }; const char KDLNA_BOOLEAN_FALSE = '0'; const char KDLNA_BOOLEAN_TRUE = '1'; enum ADDITIONAL_INFO { NO_DLNA_DATA = -1, NO_ADDITIONAL_INFO = 0, JPEG_SM = 1, JPEG_MED, JPEG_LRG, JPEG_TN, JPEG_SM_ICO, JPEG_LRG_ICO, PNG_TN, PNG_SM_ICO, PNG_LRG_ICO, PNG_LRG, MP3, }; const static TLitC8<sizeof( "image/jpeg" )> KMT_IMAGE_JPEG ={sizeof( "image/jpeg" )-1, "image/jpeg" }; const static TLitC8<sizeof( "image/png" )> KMT_IMAGE_PNG ={sizeof( "image/png" )-1, "image/png" }; const static TLitC8<sizeof( "image/gif" )> KMT_IMAGE_GIF ={sizeof( "image/gif" )-1, "image/gif" }; const static TLitC8<sizeof( "image/bmp" )> KMT_IMAGE_BMP ={sizeof( "image/bmp" )-1, "image/bmp" }; const static TLitC8<sizeof( "audio/mpeg" )> KMT_AUDIO_MP3 ={sizeof( "audio/mpeg" )-1, "audio/mpeg" }; const static TLitC8<sizeof( "text/plain" )> KMT_TEXT_PLAIN ={sizeof( "text/plain" )-1, "text/plain" }; const static TLitC8<sizeof( "image" )> KMimeImage ={sizeof( "image" )-1, "image" }; const static TLitC8<sizeof( "audio" )> KMimeAudio ={sizeof( "audio" )-1, "audio" }; const static TLitC8<sizeof( "video" )> KMimeVideo ={sizeof( "video" )-1, "video" }; const static TLitC8<sizeof( "*DLNA.ORG_OP=??*" )> KDEFAULT_FOURTH_FIELD_OP_PATTERN ={sizeof( "*DLNA.ORG_OP=??*" )-1, "*DLNA.ORG_OP=??*" }; const static TLitC8<sizeof( "*DLNA.ORG_FLAGS=????????????????????????????????*" )> KDEFAULT_FOURTH_FIELD_AVIMAGE_PATTERN ={sizeof( "*DLNA.ORG_FLAGS=????????????????????????????????*" )-1, "*DLNA.ORG_FLAGS=????????????????????????????????*" }; class CUpnpProtocolInfoLocal: public CUpnpDlnaProtocolInfo{ private: CUpnpProtocolInfoLocal(); public: virtual ~CUpnpProtocolInfoLocal(); IMPORT_C static CUpnpProtocolInfoLocal* NewL(const TDesC8& aInputString); IMPORT_C static CUpnpProtocolInfoLocal* NewL(const TDesC8& aMimeType, TInt aAdditionalInfo); IMPORT_C static CUpnpProtocolInfoLocal* NewL(const TDesC8& aMimeType, const TDesC8& aDlnaPn); private: void ConstructL(const TDesC8& aInputString); void ConstructFromDlnaPnL(const TDesC8& aMimeType, const TDesC8& aDlnaPn); void ConstructL(const TDesC8& aMimeType, TInt aAdditionalInfo); private: void ChooseDlnaL(const TDesC8& aMimeType, TInt aAdditionalInfo); void DefaultValuesL(); void FillAccordingToAddInfoL(TInt aAdditionalInfo); void FillAccordingToMimeL(const TDesC8& aMimeType); void ZeroParameters(); void SetDefaultFourthField(); virtual void GetFourthParameterInternalL(TDes8& aBuffer); };# 57 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpxmlcontentfilter.h" 1# 1 "X:/epoc32/include/xmlengnodefilter.h" 1# 23 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpxmlcontentfilter.h" 2class CUpnpXmlContentFilter : public CBase, MXmlEngNodeFilter {public: virtual TXmlEngNodeFilterResult AcceptNode(TXmlEngNode aNode); public: static HBufC8* SerializeLC(RXmlEngDocument& aDoc, TXmlEngElement& aElement ); };# 58 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpstatehandler.h" 1#define C_CUPNPSTATEHANDLER_Hclass TUpnpContainerUpdateId;class CUpnpContentDirectory;class CUpnpStateHandler : public CBase { public: CUpnpStateHandler ( ); ~CUpnpStateHandler (); public: static CUpnpStateHandler* NewL(CUpnpContentDirectory* aCd); void ConstructL(CUpnpContentDirectory* aCd); TInt IncreaseSystemUpdateIdL(); void IncreaseContainerUpdateIdL( const TDesC8& aContainerID ); RArray<TUpnpContainerUpdateId>& ContainerUpdateIds( ); TInt ContainerUpdateId( const TDesC8& aContainerID ); void StateVariableEvented(const TDesC8& aVariableName); TBool IsEnable(); private: RArray<TUpnpContainerUpdateId> iContainerUpdateIds; TUint iSystemUpdateId; RArray<TUpnpContainerUpdateId> iCurrentContainerUpdateIds; TBool iContainerUpdateIdsEvented; CUpnpContentDirectory* iCd; }; # 59 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnptransferuploader.h" 1#define C_CUPNPTRANSFERUPLOADER_H# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnptransferbase.h" 1#define C_CUPNPTRANSFERBASE_H# 1 "X:/epoc32/include/platform/mw/httptransferobserver.h" 1#define C_MHTTPTRANSFEROBSERVER_Hclass MHttpTransferObserver {public: virtual void TransferProgress( TAny* aKey, TInt aBytes, TInt aTotalBytes )=0; virtual void ReadyForTransferL( TAny* aKey )=0; virtual void TransferCompleted( TAny* aKey, TInt aStatus )=0; };# 25 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnptransferbase.h" 2class CUpnpContentDirectory;class CHttpTransferBase;class MUpnpTransferObserver;const TInt KDefaultAccessPoint = 11;const TInt KDefaultBuffer = 64000;const TInt KNumOfConcurrentTransactions = 2;class CUpnpTransferBase: public CBase , public MHttpTransferObserver{public: virtual ~CUpnpTransferBase(); virtual void ReadyForTransferL( TAny* aKey); virtual void TransferProgress( TAny* aKey, TInt aBytes, TInt aTotalBytes ); virtual void TransferCompleted( TAny* aKey, TInt aStatus ); public: void CreateAndQueueHttpFileL( const TDesC8& aUri, const TDesC& aTargetPath, TInt aKey ); void SetHeaderL( TInt aKey, const TDesC8& aFieldName, const TDesC8& aFieldValue ); void TrackProgess(TInt aKey, TBool aSwitchOn); virtual void CancelTransfer( TInt aKey); protected: CUpnpTransferBase( MUpnpTransferObserver* aCd ); TInt MapStatus( TInt aErrorCode ); protected: MUpnpTransferObserver* iObserver; CHttpTransferBase* iHttpTransferBase; };# 23 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnptransferuploader.h" 2class CHttpUploader;class CUpnpTransferUploader: public CUpnpTransferBase{public: static CUpnpTransferUploader* NewLC( MUpnpTransferObserver* aCd ); static CUpnpTransferUploader* NewL( MUpnpTransferObserver* aCd ); virtual ~CUpnpTransferUploader(); public: void UploadFileL(TInt aKey); void DownloadFileL(const TDesC8& aUri, const TDesC& aTargetPath, TInt aKey); void UploadFileL( const TDesC8& aUri,const TDesC& aTargetPath, const TDesC8& aContentType, TInt aKey); private: CUpnpTransferUploader( MUpnpTransferObserver* aCd ); void ConstructL(); private: };# 60 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpmimemapper.h" 1#define UPNPMIMEMAPPER_H# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpmap.h" 1#define UPNPMAP_H# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpmapelement.h" 1#define UPNPMAPELEMENT_Hclass CUpnpElement;class CUpnpObject;class CUri8;class CUpnpMapElement: public CBase {public: static CUpnpMapElement* NewLC(const TDesC8& aKey, TAny* aValue); static CUpnpMapElement* NewL(const TDesC8& aKey, TAny* aValue); virtual ~CUpnpMapElement();public: const TDesC8& Key(); TAny* Value(); CUpnpMapElement* Next(); void SetNext(CUpnpMapElement* aNext);private: CUpnpMapElement(TAny* iItem); void ConstructL(const TDesC8& aKey); private: HBufC8* iKey; TAny* iValue; CUpnpMapElement* iNext;}; # 25 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpmap.h" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpmapbase.h" 1#define UPNPMAPBASE_Hclass CUpnpMapBase: public CBase{public: void PutL(const TDesC8& aKey, TAny* aValue); TAny* Get(const TDesC8& aKey); TAny* Remove(const TDesC8& aKey); virtual void Clear() = 0;protected: CUpnpMapBase(); void ConstructL();protected: CUpnpMapElement* iFirst; };# 26 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpmap.h" 2template<class T>class CUpnpMap : public CUpnpMapBase{public: virtual ~CUpnpMap(); void PutL(const TDesC8& aKey, T* aValue); const T* Get(const TDesC8& aKey); T* Remove(const TDesC8& aKey); void Clear();public: CUpnpMap();};template<class T>CUpnpMap<T>::CUpnpMap(){}template<class T>const T* CUpnpMap<T>::Get(const TDesC8& aKey){ return static_cast<T*> CUpnpMapBase::Get(aKey) );}template<class T>void CUpnpMap<T>::PutL(const TDesC8& aKey, T* aValue){ CUpnpMapBase::PutL(aKey, aValue);}template<class T>CUpnpMap<T>::~CUpnpMap(){ Clear();}template<class T>void CUpnpMap<T>::Clear(){ while(iFirst) { CUpnpMapElement* next = iFirst->Next(); delete static_cast<T*> iFirst->Value() ); delete iFirst; iFirst = next; }}# 25 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnpmimemapper.h" 2const static TLitC8<sizeof( "jpg" )> KExtensionJpg ={sizeof( "jpg" )-1, "jpg" };const static TLitC8<sizeof( "png" )> KExtensionPng ={sizeof( "png" )-1, "png" };const static TLitC8<sizeof( "txt" )> KExtensionTxt ={sizeof( "txt" )-1, "txt" };const static TLitC8<sizeof( "mp3" )> KExtensionMp3 ={sizeof( "mp3" )-1, "mp3" };const static TLitC8<sizeof( "gif" )> KExtensionGif ={sizeof( "gif" )-1, "gif" };const static TLitC8<sizeof( "bmp" )> KExtensionBmp ={sizeof( "bmp" )-1, "bmp" };const static TLitC<sizeof(L".wav" )/2> KExtensionWav ={sizeof(L".wav" )/2-1,L".wav" };const static TLitC<sizeof(L".aac" )/2> KExtensionAac ={sizeof(L".aac" )/2-1,L".aac" };const static TLitC8<sizeof( "application/xhtml+xml" )> KXHtmlMime ={sizeof( "application/xhtml+xml" )-1, "application/xhtml+xml" }; const static TLitC<sizeof(L".xhtml" )/2> KXHtmlExt ={sizeof(L".xhtml" )/2-1,L".xhtml" }; const static TLitC8<sizeof( "text/html" )> KHtmlMime ={sizeof( "text/html" )-1, "text/html" }; const static TLitC<sizeof(L".html" )/2> KHtmlExt ={sizeof(L".html" )/2-1,L".html" };const static TLitC8<sizeof( "text/xml" )> KXmlMime1 ={sizeof( "text/xml" )-1, "text/xml" }; const static TLitC8<sizeof( "application/xml" )> KXmlMime2 ={sizeof( "application/xml" )-1, "application/xml" };const static TLitC8<sizeof( "application/x-xml" )> KXmlMime3 ={sizeof( "application/x-xml" )-1, "application/x-xml" }; const static TLitC<sizeof(L".xml" )/2> KXmlExt ={sizeof(L".xml" )/2-1,L".xml" };const static TLitC8<sizeof( "text/plain" )> KTxtMime ={sizeof( "text/plain" )-1, "text/plain" };const static TLitC8<sizeof( "application/txt" )> KTxtMime2 ={sizeof( "application/txt" )-1, "application/txt" };const static TLitC8<sizeof( "browser/internal" )> KTxtMime3 ={sizeof( "browser/internal" )-1, "browser/internal" };const static TLitC8<sizeof( "text/anytext" )> KTxtMime4 ={sizeof( "text/anytext" )-1, "text/anytext" };const static TLitC8<sizeof( "widetext/plain" )> KTxtMime5 ={sizeof( "widetext/plain" )-1, "widetext/plain" };const static TLitC8<sizeof( "widetext/paragraph" )> KTxtMime6 ={sizeof( "widetext/paragraph" )-1, "widetext/paragraph" }; const static TLitC<sizeof(L".txt" )/2> KTxtExt ={sizeof(L".txt" )/2-1,L".txt" };const static TLitC8<sizeof( "image/jpeg" )> KJpegMime ={sizeof( "image/jpeg" )-1, "image/jpeg" }; const static TLitC<sizeof(L".jpeg" )/2> KJpegExt ={sizeof(L".jpeg" )/2-1,L".jpeg" };const static TLitC8<sizeof( "image/jpg" )> KJpegMime2 ={sizeof( "image/jpg" )-1, "image/jpg" };const static TLitC8<sizeof( "image/jpe_" )> KJpegMime3 ={sizeof( "image/jpe_" )-1, "image/jpe_" };const static TLitC8<sizeof( "image/pjpeg" )> KJpegMime4 ={sizeof( "image/pjpeg" )-1, "image/pjpeg" }; const static TLitC8<sizeof( "image/vnd.swiftview-jpeg" )> KJpegMime5 ={sizeof( "image/vnd.swiftview-jpeg" )-1, "image/vnd.swiftview-jpeg" }; const static TLitC8<sizeof( "image/jpeg" )> KJpgMime ={sizeof( "image/jpeg" )-1, "image/jpeg" }; const static TLitC<sizeof(L".jpg" )/2> KJpgExt ={sizeof(L".jpg" )/2-1,L".jpg" };const static TLitC8<sizeof( "image/jpg" )> KJpgMime2 ={sizeof( "image/jpg" )-1, "image/jpg" }; const static TLitC8<sizeof( "image/jpe_" )> KJpgMime3 ={sizeof( "image/jpe_" )-1, "image/jpe_" }; const static TLitC8<sizeof( "image/pjpeg" )> KJpgMime4 ={sizeof( "image/pjpeg" )-1, "image/pjpeg" }; const static TLitC8<sizeof( "image/vnd.swiftview-jpeg" )> KJpgMime5 ={sizeof( "image/vnd.swiftview-jpeg" )-1, "image/vnd.swiftview-jpeg" }; const static TLitC8<sizeof( "image/gif" )> KGifMime ={sizeof( "image/gif" )-1, "image/gif" }; const static TLitC<sizeof(L".gif" )/2> KGifExt ={sizeof(L".gif" )/2-1,L".gif" };const static TLitC8<sizeof( "image/x-xbitmap" )> KGifMime2 ={sizeof( "image/x-xbitmap" )-1, "image/x-xbitmap" }; const static TLitC8<sizeof( "image/gi_" )> KGifMime3 ={sizeof( "image/gi_" )-1, "image/gi_" }; const static TLitC8<sizeof( "image/png" )> KPngMime ={sizeof( "image/png" )-1, "image/png" }; const static TLitC<sizeof(L".png" )/2> KPngExt ={sizeof(L".png" )/2-1,L".png" };const static TLitC8<sizeof( "application/png" )> KPngMime2 ={sizeof( "application/png" )-1, "application/png" }; const static TLitC8<sizeof( "application/x-png" )> KPngMime3 ={sizeof( "application/x-png" )-1, "application/x-png" }; const static TLitC8<sizeof( "video/mpeg" )> KMpgMime1 ={sizeof( "video/mpeg" )-1, "video/mpeg" }; const static TLitC<sizeof(L".mpg" )/2> KMpgExt1 ={sizeof(L".mpg" )/2-1,L".mpg" };const static TLitC8<sizeof( "video/mpg" )> KMpgMime2 ={sizeof( "video/mpg" )-1, "video/mpg" }; const static TLitC8<sizeof( "video/x-mpg" )> KMpgMime3 ={sizeof( "video/x-mpg" )-1, "video/x-mpg" }; const static TLitC8<sizeof( "video/mpeg2" )> KMpgMime4 ={sizeof( "video/mpeg2" )-1, "video/mpeg2" }; const static TLitC8<sizeof( "application/x-pn-mpg" )> KMpgMime5 ={sizeof( "application/x-pn-mpg" )-1, "application/x-pn-mpg" }; const static TLitC8<sizeof( "video/x-mpeg" )> KMpgMime6 ={sizeof( "video/x-mpeg" )-1, "video/x-mpeg" }; const static TLitC8<sizeof( "video/x-mpeg2a" )> KMpgMime7 ={sizeof( "video/x-mpeg2a" )-1, "video/x-mpeg2a" }; const static TLitC8<sizeof( "audio/mpeg" )> KMpgMime8 ={sizeof( "audio/mpeg" )-1, "audio/mpeg" }; const static TLitC8<sizeof( "audio/x-mpeg" )> KMpgMime9 ={sizeof( "audio/x-mpeg" )-1, "audio/x-mpeg" }; const static TLitC8<sizeof( "image/mpg" )> KMpgMime10 ={sizeof( "image/mpg" )-1, "image/mpg" }; const static TLitC8<sizeof( "video/mpeg4" )> KMpeg4Mime ={sizeof( "video/mpeg4" )-1, "video/mpeg4" }; const static TLitC<sizeof(L".mpeg4" )/2> KMpeg4Ext ={sizeof(L".mpeg4" )/2-1,L".mpeg4" };const static TLitC8<sizeof( "video/mp4" )> KMp4Mime ={sizeof( "video/mp4" )-1, "video/mp4" }; const static TLitC<sizeof(L".mp4" )/2> KMp4Ext ={sizeof(L".mp4" )/2-1,L".mp4" };const static TLitC8<sizeof( "video/mp4v-es" )> KMp4Mime2 ={sizeof( "video/mp4v-es" )-1, "video/mp4v-es" }; const static TLitC8<sizeof( "audio/mp4" )> KMp4Mime3 ={sizeof( "audio/mp4" )-1, "audio/mp4" }; const static TLitC8<sizeof( "video/avi" )> KAviMime1 ={sizeof( "video/avi" )-1, "video/avi" };const static TLitC8<sizeof( "video/msvideo" )> KAviMime2 ={sizeof( "video/msvideo" )-1, "video/msvideo" };const static TLitC8<sizeof( "video/x-msvideo" )> KAviMime3 ={sizeof( "video/x-msvideo" )-1, "video/x-msvideo" }; const static TLitC<sizeof(L".avi" )/2> KAviExt ={sizeof(L".avi" )/2-1,L".avi" };const static TLitC8<sizeof( "image/avi" )> KAviMime4 ={sizeof( "image/avi" )-1, "image/avi" }; const static TLitC8<sizeof( "video/xmpg2" )> KAviMime5 ={sizeof( "video/xmpg2" )-1, "video/xmpg2" }; const static TLitC8<sizeof( "application/x-troff-msvideo" )> KAviMime6 ={sizeof( "application/x-troff-msvideo" )-1, "application/x-troff-msvideo" }; const static TLitC8<sizeof( "audio/aiff" )> KAviMime7 ={sizeof( "audio/aiff" )-1, "audio/aiff" }; const static TLitC8<sizeof( "audio/avi" )> KAviMime8 ={sizeof( "audio/avi" )-1, "audio/avi" }; const static TLitC8<sizeof( "audio/x-mpeg-3" )> KMp3Mime1 ={sizeof( "audio/x-mpeg-3" )-1, "audio/x-mpeg-3" };const static TLitC8<sizeof( "audio/mpeg3" )> KMp3Mime2 ={sizeof( "audio/mpeg3" )-1, "audio/mpeg3" }; const static TLitC<sizeof(L".mp3" )/2> KMp3Ext ={sizeof(L".mp3" )/2-1,L".mp3" };const static TLitC8<sizeof( "audio/mpeg" )> KMp3Mime3 ={sizeof( "audio/mpeg" )-1, "audio/mpeg" }; const static TLitC8<sizeof( "audio/x-mpeg" )> KMp3Mime4 ={sizeof( "audio/x-mpeg" )-1, "audio/x-mpeg" }; const static TLitC8<sizeof( "audio/mp3" )> KMp3Mime5 ={sizeof( "audio/mp3" )-1, "audio/mp3" }; const static TLitC8<sizeof( "audio/x-mp3" )> KMp3Mime6 ={sizeof( "audio/x-mp3" )-1, "audio/x-mp3" }; const static TLitC8<sizeof( "audio/x-mpeg3" )> KMp3Mime7 ={sizeof( "audio/x-mpeg3" )-1, "audio/x-mpeg3" }; const static TLitC8<sizeof( "audio/mpg" )> KMp3Mime8 ={sizeof( "audio/mpg" )-1, "audio/mpg" }; const static TLitC8<sizeof( "audio/x-mpg" )> KMp3Mime9 ={sizeof( "audio/x-mpg" )-1, "audio/x-mpg" }; const static TLitC8<sizeof( "audio/x-mpegaudio" )> KMp3Mime10 ={sizeof( "audio/x-mpegaudio" )-1, "audio/x-mpegaudio" }; const static TLitC8<sizeof( "audio/aac" )> KAacMime ={sizeof( "audio/aac" )-1, "audio/aac" }; const static TLitC<sizeof(L".aac" )/2> KAacExt ={sizeof(L".aac" )/2-1,L".aac" };const static TLitC8<sizeof( "audio/x-ms-wma" )> KWmaMime ={sizeof( "audio/x-ms-wma" )-1, "audio/x-ms-wma" }; const static TLitC<sizeof(L".wma" )/2> KWmaExt ={sizeof(L".wma" )/2-1,L".wma" };const static TLitC8<sizeof( "video/x-ms-asf" )> KWmaMime2 ={sizeof( "video/x-ms-asf" )-1, "video/x-ms-asf" }; const static TLitC8<sizeof( "image/bmp" )> KBmpMime ={sizeof( "image/bmp" )-1, "image/bmp" }; const static TLitC<sizeof(L".bmp" )/2> KBmpExt ={sizeof(L".bmp" )/2-1,L".bmp" };const static TLitC8<sizeof( "image/x-bmp" )> KBmpMime2 ={sizeof( "image/x-bmp" )-1, "image/x-bmp" }; const static TLitC8<sizeof( "image/x-bitmap" )> KBmpMime3 ={sizeof( "image/x-bitmap" )-1, "image/x-bitmap" }; const static TLitC8<sizeof( "image/x-xbitmap" )> KBmpMime4 ={sizeof( "image/x-xbitmap" )-1, "image/x-xbitmap" }; const static TLitC8<sizeof( "image/x-ms-bmp" )> KBmpMime5 ={sizeof( "image/x-ms-bmp" )-1, "image/x-ms-bmp" }; const static TLitC8<sizeof( "application/bmp" )> KBmpMime6 ={sizeof( "application/bmp" )-1, "application/bmp" }; const static TLitC8<sizeof( "application/x-bmp" )> KBmpMime7 ={sizeof( "application/x-bmp" )-1, "application/x-bmp" }; const static TLitC8<sizeof( "application/x-win-bitmap" )> KBmpMime8 ={sizeof( "application/x-win-bitmap" )-1, "application/x-win-bitmap" }; const static TLitC8<sizeof( "application/preview" )> KBmpMime9 ={sizeof( "application/preview" )-1, "application/preview" }; const static TLitC8<sizeof( "audio/L16" )> KAudioL16 ={sizeof( "audio/L16" )-1, "audio/L16" };const static TLitC8<sizeof( "audio/vnd.dlna.adts" )> KAudioVnd ={sizeof( "audio/vnd.dlna.adts" )-1, "audio/vnd.dlna.adts" };const static TLitC8<sizeof( "audio/3gpp" )> KAudio3gpp ={sizeof( "audio/3gpp" )-1, "audio/3gpp" }; const static TLitC8<sizeof( "video/3gpp" )> KVideo3gpp ={sizeof( "video/3gpp" )-1, "video/3gpp" }; const static TLitC<sizeof(L".3gp" )/2> K3gpExt ={sizeof(L".3gp" )/2-1,L".3gp" };const static TLitC8<sizeof( "audio/AMR" )> KAudioAMR ={sizeof( "audio/AMR" )-1, "audio/AMR" }; const static TLitC<sizeof(L".amr" )/2> KAmrExt ={sizeof(L".amr" )/2-1,L".amr" };const static TLitC8<sizeof( "audio/wav" )> KAudioWav ={sizeof( "audio/wav" )-1, "audio/wav" };const static TLitC8<sizeof( "video/x-ms-wmv" )> KVideoWmv ={sizeof( "video/x-ms-wmv" )-1, "video/x-ms-wmv" }; const static TLitC<sizeof(L".wmv" )/2> KWmvExt ={sizeof(L".wmv" )/2-1,L".wmv" };const static TLitC8<sizeof( "video/x-ms-avi" )> KVideoAvi ={sizeof( "video/x-ms-avi" )-1, "video/x-ms-avi" };const static TLitC8<sizeof( "application/vnd.rn-realmedia" )> KRealMedia ={sizeof( "application/vnd.rn-realmedia" )-1, "application/vnd.rn-realmedia" }; const static TLitC<sizeof(L".rm" )/2> KRmExt ={sizeof(L".rm" )/2-1,L".rm" };const static TLitC8<sizeof( "audio/vnd.rn-realaudio" )> KRealAudio ={sizeof( "audio/vnd.rn-realaudio" )-1, "audio/vnd.rn-realaudio" }; const static TLitC<sizeof(L".ra" )/2> KRealAudioExt ={sizeof(L".ra" )/2-1,L".ra" };const static TLitC8<sizeof( "audio/x-pn-realaudio-plugin" )> KPmRealAudioPlugin ={sizeof( "audio/x-pn-realaudio-plugin" )-1, "audio/x-pn-realaudio-plugin" }; const static TLitC<sizeof(L".rpm" )/2> KPmRealAudioPluginExt ={sizeof(L".rpm" )/2-1,L".rpm" };const static TLitC8<sizeof( "audio/x-pn-realaudio" )> KPmRealAudio ={sizeof( "audio/x-pn-realaudio" )-1, "audio/x-pn-realaudio" }; const static TLitC<sizeof(L".ra" )/2> KPmRealAudioExt ={sizeof(L".ra" )/2-1,L".ra" };const static TLitC8<sizeof( "video/vnd.rn-realvideo" )> KRealVideo ={sizeof( "video/vnd.rn-realvideo" )-1, "video/vnd.rn-realvideo" }; const static TLitC<sizeof(L".rv" )/2> KRealVideoExt ={sizeof(L".rv" )/2-1,L".rv" };class CUpnpMimeMapper: public CBase {public: static CUpnpMimeMapper* NewL(); virtual ~CUpnpMimeMapper();public: void AddMimeMapElL( const TDesC8& aKey, const TDesC& aVal ); void InitMimeToExtensionMapL(); HBufC8* GetExtensionL( const TDesC8& aMimeType ); const HBufC* Get( const TDesC8& aKey );private: CUpnpMimeMapper(); void ConstructL(); private: CUpnpMap<HBufC>* iMimeToExtMap; }; # 61 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnptransfercontroller.h" 1#define C_CUPNPTRANSFERCONTROLLER_Hclass CUpnpContentDirectory;class CUpnpFileTransferEvent;class CUpnpHttpMessage;class CUpnpTransferController: public CBase, public MUpnpFileTransferTimerObserver{public: static CUpnpTransferController* NewL( CUpnpContentDirectory* aCd ); virtual ~CUpnpTransferController(); void HttpResponseReceivedL( TInt aSessionId, TInt aStatusCode); TUpnpErrorCode StopTransferResourceL( TInt aId ); TInt Transfer( TInt aTransferId ); TBool IsMaxImportExportTransfers(); CUpnpFileTransferEvent* RemoveTransferLC( TInt aTransferId ); CUpnpFileTransferEvent* TransferL( TInt aTransferId ); void TransferEvent( CUpnpFileTransferTimerObserver* aTimer ); void AddIncomingTransferInternalL(CUpnpHttpMessage* aHttpMsg); void TransferFailL(CUpnpHttpMessage* aHttpMsg); void NotifyTransferFailL(CUpnpHttpMessage* aHttpMsg); private: CUpnpTransferController( CUpnpContentDirectory* aCd ); void ConstructL(); public: RPointerArray<CUpnpFileTransfer> iFileTransfers; RPointerArray<CUpnpFileTransferTimerObserver> iStatusTimers; private: CUpnpContentDirectory* iContentDirectory; }; # 62 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/upnptransferinterface.h" 1#define C_CUPNPTRANSERINTERFACE_Hclass MUpnpTransferInterface { public: virtual void UploadFileL( TInt aKey, const TDesC8& aUri, const TDesC& aTargetPath, const TDesC8& aContentType ) = 0; virtual void DownloadFileL( TInt aKey, const TDesC8& aUri, const TDesC& aTargetPath ) = 0; virtual void TrackUploadProgress( TInt aKey, TBool aSwitchOn )=0; virtual void TrackDownloadProgress( TInt aKey, TBool aSwitchOn )=0; virtual void CancelUpload( TInt aKey ) = 0; virtual void CancelDownload( TInt aKey ) = 0; }; # 63 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/inc/dlna/upnpdlnafilter.h" 1#define UPNPDLNAFILTER_H class MUpnpContentDirectoryDataFinder;class CUpnpHttpMessage;class CUpnpDlnaProtocolInfo;class CUpnpSecurityManager;class CUpnpHttpFileServeTransaction;class CUpnpHttpFileReceiveTransaction;class CUpnpDlnaFilterHeaders;class TUpnpDlnaCorelation;class CUpnpDlnaFilter : public CBase, public MUpnpHttpServerTransactionCreator {public: ~CUpnpDlnaFilter(); static CUpnpDlnaFilter* NewL( MUpnpContentDirectoryDataFinder* aFinder, CUpnpSecurityManager* aSecurityManager ); static CUpnpDlnaFilter* NewLC( MUpnpContentDirectoryDataFinder* aFinder, CUpnpSecurityManager* aSecurityManager ); virtual void NewTransactionL( const TDesC8& aMethod, const TDesC8& aUri, const TInetAddr& aSender, CUpnpHttpServerTransaction*& aResultTrans ); void FormatPathL( CUpnpHttpFileServeTransaction *aTransaction, TDes &aPath ); TInt PrepareHeaderL( CUpnpHttpFileServeTransaction &aTransaction ); TInt CheckDLNAPostCorrelationsL(CUpnpHttpFileReceiveTransaction& aTransaction); HBufC* DetermineDownloadPathL(CUpnpHttpFileReceiveTransaction& aTransaction); CUpnpSecurityManager* SecurityManager(); RFs& FileSession(); TInt AuthorizeRequestL( const TDesC& aFileName, const TInetAddr& aSender );public: CUpnpDlnaFilter( MUpnpContentDirectoryDataFinder* aFinder, CUpnpSecurityManager* aSecurityManager ); void ConstructL();private: HBufC8* CUpnpDlnaFilter::ThirdFieldFromCdL( const TDesC8& aContentUri ); void GetMediaFileNameL( TInt aObjectId, TPtr& aFileName ); TInt FindSharedFolderDBL(const TDesC8& aUrlPath, const TDesC8& aFileName, HBufC8*& aSystemPath); TInt CheckImportUriL( TDesC8& aImportUri ); TInt CheckDLNACorrelationsL( CUpnpHttpFileServeTransaction& aTransaction ); TInt GetContentTypeL( CUpnpHttpFileServeTransaction &aTransaction, HBufC8*& aMime, const TDesC16& aFilename ); CUpnpDlnaProtocolInfo* ProtocolInfoL( const TDesC8& aContentUri ); void AddHeaderIfNotEmptyL( const TDesC8& aHeaderName, CUpnpHttpFileServeTransaction& aTransaction ); HBufC* MakeFileNameUniqueL( const TDesC& aFilename, RFs& aFs ); HBufC* PreparePostfixToMakeFileUniqueL( const TDesC& aFilename, RFs& aFs ); HBufC* PrepareBaseFileNameL( const TDesC& aFilename, RFs& aFs ); TInt CheckCorelationL( CUpnpHttpFileServeTransaction& aTransaction, TUpnpDlnaCorelation& aDlnaCorelation ); TInt CheckTransferModeL( CUpnpHttpFileServeTransaction& aTransaction, TUpnpDlnaCorelation& aDlnaCorelation ); TInt AppendCorelationHeadersL( CUpnpHttpFileServeTransaction& aTransaction, TUpnpDlnaCorelation& aDlnaCorelation, TDesC8& aTransferMode ); protected: MUpnpContentDirectoryDataFinder* iCdDataFinder; CUpnpSecurityManager* iSecurityManager; CUpnpDlnaProtocolInfo* iProtocolInfo; RFs iFs; };# 64 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/epoc32/include/platform/mw/upnphttpserversession.h" 1#define UPNPHTTPSERVERSESSION_Hclass CUpnpHttpServerRuntime;class MUpnpHttpServerObserver;class CUpnpHttpMessage;const TInt KUpnpHttpServerRandomPort = 0;class CUpnpHttpServerSession : public CBase {public: IMPORT_C static CUpnpHttpServerSession* NewL( TUint aUnusedIapId, MUpnpHttpServerObserver& aObserver ); ~CUpnpHttpServerSession(); IMPORT_C void StartL( const TInt aPort = KUpnpHttpServerRandomPort ); IMPORT_C void Stop(); IMPORT_C void GetAddress( TInetAddr& aAddr ); IMPORT_C CUpnpHttpServerRuntime& DefaultRuntime(); static CUpnpHttpServerSession* NewLC( TUint aUnusedIapId, MUpnpHttpServerObserver& aObserver ); IMPORT_C TSockAddr* HWAddressL(); IMPORT_C TInt SendMessageL( CUpnpHttpMessage* aMessage ); private: CUpnpHttpServerSession(); void ConstructL( TUint aUnusedIapId, MUpnpHttpServerObserver& aObserver );private: CUpnpHttpServerRuntime* iServerRuntime; };# 65 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/epoc32/include/platform/mw/upnphttpserverruntime.h" 1#define UPNPHTTPSERVERRUNTIME_Hclass MUpnpHttpServerTransactionCreator;class CUpnpHttpServer;class MUpnpHttpServerObserver;class CUpnpHttpServerRuntime : public CBase {public: IMPORT_C void SetCreator( MUpnpHttpServerTransactionCreator& aCreator ); static CUpnpHttpServerRuntime* NewL( TUint aUnusedIapId, MUpnpHttpServerObserver& aObserver ); static CUpnpHttpServerRuntime* NewLC( TUint aUnusedIapId, MUpnpHttpServerObserver& aObserver ); ~CUpnpHttpServerRuntime(); CUpnpHttpServer& HttpServer(); void DeleteServer(); void StartServerL( const TInt aPort ); private: CUpnpHttpServerRuntime( TUint aUnusedIapId, MUpnpHttpServerObserver& aObserver ); void ConstructL(); void GetIapAndStartServerL(); void OpenSocketServerL(); void CloseSocketServer(); private: RSocketServ iSocketServ; CUpnpHttpServer* iHttpServer; MUpnpHttpServerObserver& iObserver; MUpnpHttpServerTransactionCreator* iTransactionCreator; TBool iIsSocketOpened; };# 66 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/epoc32/include/platform/mw/upnpsettings.h" 1#define C_CUPNPSETTING_Hconst TUid KHnCRUidUPnPStack = { 0x2000F881 }; const TUid KCRUidUPnPStack = { 0x101F9784 };class CRepository;class CUpnpSettings: public CBase {public: static const TUint KUPnPStackIapId = 1; static const TUint KUPnPStackCustomizedUserAgent = 2; static const TUint KUPnPStackFileBufferSize = 3; static const TUint KUPnPStackCustomizedServerHeader = 4; static const TUint KUPnPStackMSearchConfig = 5; public: IMPORT_C static CUpnpSettings* NewL(TUid aRepositoryUid); virtual ~CUpnpSettings();public: IMPORT_C TInt Set(TUint aId, TInt& aValue); IMPORT_C TInt Get(TUint aId, TInt& aValue); IMPORT_C static TInt GetIapL(); IMPORT_C TInt Set(TUint aId, const TDesC& aValue); IMPORT_C TInt SetL(TUint aId, const TDesC8& aValue); IMPORT_C TInt Get(TUint aId, TDes& aValue); IMPORT_C HBufC8* GetL(TUint aId); IMPORT_C static HBufC8* GetUserAgentL(); IMPORT_C static TInt GetFileBufferSizeL(); IMPORT_C static HBufC8* GetServerHeaderL(); static HBufC8* GetMSearchConfigurationL();private: void ConstructL(TUid aRepositoryId);private: CRepository* iRepository; };# 67 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/epoc32/include/platform/mw/upnpdeviceimplementationbase.h" 1#define C_CUPNPDEVICEIMPLEMENTATIONBASE_H# 1 "X:/epoc32/include/platform/mw/upnpdiscoveryobserver.h" 1#define C_MUpnpDiscoveryObserver_Hclass CUpnpDevice;class MUpnpDiscoveryObserver{public: virtual const TDesC8 & Path() = 0; virtual void DeviceFoundL( CUpnpDevice& aDevice ) = 0; virtual void DeviceLostL( CUpnpDevice& aDevice ) = 0;};# 26 "X:/epoc32/include/platform/mw/upnpdeviceimplementationbase.h" 2class TUpnpDevice;class TUpnpService;class CUpnpIcon;class CUpnpDesciptionProperty;class CUpnpDeviceDescriptionStore;class CUpnpHttpServerTransactionHandler;class MUpnpDeviceDescriptionProvider;class CUpnpDeviceImplementationBase : public CUpnpDevice { public: IMPORT_C virtual ~CUpnpDeviceImplementationBase(); virtual void StartL( const TInt aPort = KRandomPort ) = 0; virtual void StopL() = 0; IMPORT_C void SetDescriptionPropertyL( const TDesC8& aPropertyName, const TDesC8& aPropertyValue ); IMPORT_C void RemoveDescriptionPropertyL( const TDesC8& aPropertyName ); IMPORT_C void RemoveIconL( const TDesC8& aUrl); IMPORT_C void RemoveIconsL(); IMPORT_C void AddIconL( const CUpnpIcon& aIcon ); void UpdateIconL( const CUpnpIcon& aIcon ); HBufC8* GenerateUuidL(); void CreateDispatcherL(); CUpnpDeviceImplementationBase(); IMPORT_C virtual TInetAddr Address(); void AttachServiceL( CUpnpService *aService ); void SetDispatcher( CUpnpDispatcher* aDispatcher ); IMPORT_C void StartIPFilteringL(); IMPORT_C void StopIPFiltering(); MUpnpDeviceDescriptionProvider& DescritptionProvider(); protected: void StartHttpServerL( const TInt aPort ); void StopHttpServer(); void CheckUuidGenL( const TDesC16& aFileName ); CUpnpDispatcher* Dispatcher(); void BaseConstructL( const TDesC8& aDeviceDescriptioUri, CUpnpDeviceDescriptionStore& aDescriptionStore, MUpnpDeviceDescriptionProvider& aProvider ); void GenerateUdnsL( CUpnpDeviceImplementationBase* aDevice ); void RegisterEmbeddedDevices(); void UnregisterEmbeddedDevicesL(); void SaveDescriptionStoreL();protected: CUpnpDispatcher* iDispatcher; HBufC8* iPath; CUpnpHttpServerTransactionHandler* iServerTransactionHandler; CUpnpDeviceDescriptionStore* iDescriptionStore; MUpnpDeviceDescriptionProvider* iDescriptionProvider; };# 68 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/epoc32/include/platform/mw/upnpsecuritymanager.h" 1#define C_CUPNPSECURITYMANAGER_Hconst TUid KCUpnpSecurityManagerUid = {0x101F977E}; const TUid KCUpnpSecurityManagerUidRemote = {0x2001137B}; class CUpnpAction;class CUpnpHttpMessage;class CUpnpSecurityManager : public CBase{public: IMPORT_C static CUpnpSecurityManager* NewL(const TDesC8& aType); IMPORT_C static CUpnpSecurityManager* NewInstanceFromUpnpSettingsL(); IMPORT_C virtual ~CUpnpSecurityManager(); virtual TInt AuthorizeMessage(CUpnpHttpMessage* aMessage, TFileName& aRequestedFile) = 0; virtual TInt AuthorizeAction(CUpnpAction* aAction) = 0; private: TUid iDtor_ID_Key; };# 69 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2# 1 "X:/epoc32/include/platform/mw/upnpmediaserversettings.h" 1#define C_CUPNPMEDIASERVERSETTINGS_Hconst TUid KHnCRUidMediaServer = { 0x2000f87f }; const TUid KCRUidMediaServer = { 0x101F978F };class CRepository;namespace UpnpMediaServerSettings { const static TLitC8<sizeof( "friendlyName" )> KFriendlyName ={sizeof( "friendlyName" )-1, "friendlyName" };const static TLitC8<sizeof( "modelURL" )> KModelUrl ={sizeof( "modelURL" )-1, "modelURL" };const static TLitC8<sizeof( "modelDescription" )> KModelDescription ={sizeof( "modelDescription" )-1, "modelDescription" };const static TLitC8<sizeof( "modelNumber" )> KModelNumber ={sizeof( "modelNumber" )-1, "modelNumber" };const static TLitC8<sizeof( "serialNumber" )> KSerialNumber ={sizeof( "serialNumber" )-1, "serialNumber" };const static TLitC8<sizeof( "presentationURL" )> KPresentationUrl ={sizeof( "presentationURL" )-1, "presentationURL" };const static TLitC8<sizeof( "modelName" )> KModelName ={sizeof( "modelName" )-1, "modelName" };const static TLitC8<sizeof( "manufacturer" )> KManufacturer ={sizeof( "manufacturer" )-1, "manufacturer" };const static TLitC8<sizeof( "manufacturerURL" )> KManufacturerUrl ={sizeof( "manufacturerURL" )-1, "manufacturerURL" };enum TMediaServerKeys { EFriendlyName = 1, EUploadDirectory = 2, ESupportedMedia = 3, ESecurityManager = 4, EModelUrl = 5, EModelDescription = 6, EModelNumber = 7, ESerialNumber = 8, EPresentationUrl = 9, EModelName = 10, EManufacturer = 11, EManufacturerUrl = 12, EUpnpMediaServerThumbnails = 13, KUpnpMediaServerBrowseLimit = 14 };}class MUpnpSettingObserver {public: virtual void SettingChangedL() = 0; }; class CUpnpMediaServerSettings : public CActive {public: IMPORT_C static CUpnpMediaServerSettings* NewL(); virtual ~CUpnpMediaServerSettings();public: IMPORT_C TInt Set(TUint aId, const TInt& aValue); IMPORT_C TInt Set(TUint aId, const TDesC& aValue); IMPORT_C TInt SetL(TUint aId, const TDesC8& aValue); IMPORT_C TInt Get(TUint aId, TInt& aValue); IMPORT_C TInt Get(TUint aId, TDes& aValue); IMPORT_C HBufC8* GetL(TUint aId); IMPORT_C TInt Subscribe(TUint aId, MUpnpSettingObserver* aObserver); private: CUpnpMediaServerSettings(); void ConstructL(TUid aRepositoryId); void RunL(); TInt RunError( TInt aErr ); void DoCancel(); private: CRepository* iRepository; MUpnpSettingObserver* iObserver; };# 70 "X:/sf/mw/dlnasrv/upnpmediaserver/contentdirectoryservice/src/upnpcontentdirectory.cpp" 2using namespace UpnpPaths;using namespace UpnpDlnaProtocolInfo;void DestroyRArray( TAny* aArray );void RPointerArrayTPtrC8( TAny* aArray ) { RPointerArray<TPtrC8>* array = reinterpret_cast<RPointerArray<TPtrC8>*>aArray); array->ResetAndDestroy( ); }CUpnpContentDirectory::CUpnpContentDirectory( CUpnpDevice& aDevice, MUpnpThumbnailCreatorObserver* aThmbObs, MUpnpTransferInterface* aTransfer ) : CUpnpServiceImplementation(aDevice), iThmbObs(aThmbObs), iTransferHandler(aTransfer) { SetExecutedAction( EUndefinedAction ); }CUpnpContentDirectory::~CUpnpContentDirectory() { delete iDownloadDir; delete iThumbDir; delete iElementdb; delete iTransferController; delete iMimeToExtMap; delete iContentDirectoryDb; iThObjectIds.Close( ); iThumbnailCreators.ResetAndDestroy( ); iDOMImpl.Close( ); if ( iBitmapServerConnection == KErrNone ) RFbsSession::Disconnect( ); iFs.Close( ); if ( iEcomUsed ) { REComSession::FinalClose( ); } delete iAutoDestroyObjects; delete iStateHandler; if ( iHttpServerSession ) { iHttpServerSession->
|
Stop
|
[static]
|