1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/inc/Mda/Common/Base.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,197 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// Mda\Common\Base.h
1.18 +// largely EMPTY - maintained for backwards compatibility
1.19 +//
1.20 +//
1.21 +
1.22 +#ifndef __MDA_COMMON_BASE_H__
1.23 +#define __MDA_COMMON_BASE_H__
1.24 +
1.25 +/*
1.26 +Notes:
1.27 +Header file for information shared between client and server side
1.28 +Contains UID definitions, function numbers
1.29 +*/
1.30 +
1.31 +// Standard EPOC32 includes
1.32 +#include <e32base.h>
1.33 +// Public Media Server includes
1.34 +#include <mda/common/base.hrh>
1.35 +
1.36 +#ifdef ASSERT
1.37 +#ifdef _DEBUG
1.38 +#undef ASSERT
1.39 +
1.40 +// Redefine assert to be a little more useful to us, i.e. to include file & line number
1.41 +#define __ASSERT_FILE__(s) _LIT(KPanicFileName,s)
1.42 +#define __ASSERT_PANIC__(l) User::Panic(KPanicFileName().Right(12),l)
1.43 +#define ASSERT(x) { __ASSERT_FILE__(__FILE__); __ASSERT_DEBUG(x, __ASSERT_PANIC__(__LINE__) ); }
1.44 +#endif
1.45 +#endif
1.46 +
1.47 +/**
1.48 + * @publishedAll
1.49 + *
1.50 + * Macro for producing different variants of Uids
1.51 + */
1.52 +#define MDA_UID(uid_name) const TUint uid_name##Value = uid_name##Define; \
1.53 + const TUid uid_name = {uid_name##Value};
1.54 +
1.55 +// Uids
1.56 +#if defined(UNICODE)
1.57 +
1.58 +/**
1.59 + * @publishedAll
1.60 + * @deprecated
1.61 + *
1.62 + * Not used in MMF
1.63 + */
1.64 +const TInt KUidMediaServerLibraryValue = KUidMediaServerLibraryUnicodeDefine;
1.65 +#else
1.66 +
1.67 +/**
1.68 + * @publishedAll
1.69 + * @deprecated
1.70 + *
1.71 + * Not used in MMF
1.72 + */
1.73 +const TInt KUidMediaServerLibraryValue = KUidMediaServerLibraryDefine;
1.74 +#endif
1.75 +
1.76 +/**
1.77 + * @publishedAll
1.78 + * @deprecated
1.79 + *
1.80 + * Not used in MMF
1.81 + */
1.82 +const TUid KUidMediaServerLibrary = {KUidMediaServerLibraryValue};
1.83 +
1.84 +/**
1.85 + * @publishedAll
1.86 + * @deprecated
1.87 + *
1.88 + * Unknown value
1.89 + */
1.90 +const TInt KMdaUnknown = -1;
1.91 +
1.92 +// Package classes
1.93 +
1.94 +/**
1.95 +@publishedAll
1.96 +@deprecated
1.97 +
1.98 +Abstract base class for all media server package types.
1.99 +
1.100 +This class has no user accessible functions.
1.101 +*/
1.102 +class TMdaRawPackage
1.103 + {
1.104 +public:
1.105 + inline TPtr8& Package();
1.106 + inline const TPtr8& Package() const;
1.107 +protected:
1.108 + TMdaRawPackage(TInt aDerivedSize);
1.109 + inline void SetSize(TInt aDerivedSize);
1.110 +protected:
1.111 + TPtr8 iThis;
1.112 + };
1.113 +
1.114 +/**
1.115 +@publishedAll
1.116 +@deprecated
1.117 +
1.118 +A data structure used to package messages (that include the package type) sent between the media server
1.119 +and its clients.
1.120 +
1.121 +This class is abstract. It defines the attributes common to packages where the derived class's type needs
1.122 +to be sent as part of the package. The attributes are a UID that identifies the package's concrete class
1.123 +(so that the server can construct objects of the correct type), and a UID that identifies the package type
1.124 +(the category of classes to which the package belongs). The package type is little used in practice. These
1.125 +attributes and the derived class's size are set during construction of the derived class.
1.126 +*/
1.127 +class TMdaPackage : public TMdaRawPackage
1.128 + {
1.129 +public:
1.130 + inline TUid Type() const;
1.131 + inline TUid Uid() const;
1.132 + inline void SetUid(TUid aUid);
1.133 + inline TBool operator==(const TMdaPackage& aPackage); // Type&Uid comparison
1.134 +protected:
1.135 + inline TMdaPackage(TUid aType, TUid aUid, TInt aDerivedSize);
1.136 +private:
1.137 + TUid iType;
1.138 + TUid iUid;
1.139 + };
1.140 +
1.141 +/**
1.142 + *
1.143 + * @publishedAll
1.144 + * @deprecated
1.145 + *
1.146 + * Media server event identification - Not used in MMF
1.147 + */
1.148 +class TMdaEvent
1.149 + {
1.150 +public:
1.151 + TInt32 iId;
1.152 + TInt32 iArg[3];
1.153 + };
1.154 +
1.155 +
1.156 +/**
1.157 + *
1.158 + * @publishedAll
1.159 + * @deprecated
1.160 + *
1.161 + * Not used in MMF
1.162 + */
1.163 +class TMdaObjectEvent
1.164 + {
1.165 +public:
1.166 + TInt iHandle;
1.167 + TMdaEvent iEvent;
1.168 + };
1.169 +
1.170 +/**
1.171 + *
1.172 + * @publishedAll
1.173 + * @deprecated
1.174 + *
1.175 + * Not used in MMF
1.176 + */
1.177 +class TMdaEventPackage : public TMdaRawPackage
1.178 + {
1.179 +public:
1.180 + inline TMdaEventPackage(); // For single events
1.181 + //
1.182 + inline TInt EventCount() const;
1.183 + inline TInt MaxEvents() const;
1.184 + inline const TMdaEvent& Event(); // First event only
1.185 + inline const TMdaEvent& Event(TInt aIndex);
1.186 + inline TInt EventFrom(); // first event only
1.187 + inline TInt EventFrom(TInt aIndex);
1.188 +protected:
1.189 + inline TMdaEventPackage(TInt aMaxEvents);
1.190 +protected:
1.191 + TInt iMaxEvents;
1.192 + TInt iValidEvents;
1.193 + TMdaObjectEvent iFirstEvent;
1.194 + };
1.195 +
1.196 +#include <mda/common/base.inl>
1.197 +
1.198 +#include <mmf/common/mmfbase.h>
1.199 +
1.200 +#endif