1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
15 // largely EMPTY - maintained for backwards compatibility
19 #ifndef __MDA_COMMON_BASE_H__
20 #define __MDA_COMMON_BASE_H__
24 Header file for information shared between client and server side
25 Contains UID definitions, function numbers
28 // Standard EPOC32 includes
30 // Public Media Server includes
31 #include <mda/common/base.hrh>
37 // Redefine assert to be a little more useful to us, i.e. to include file & line number
38 #define __ASSERT_FILE__(s) _LIT(KPanicFileName,s)
39 #define __ASSERT_PANIC__(l) User::Panic(KPanicFileName().Right(12),l)
40 #define ASSERT(x) { __ASSERT_FILE__(__FILE__); __ASSERT_DEBUG(x, __ASSERT_PANIC__(__LINE__) ); }
47 * Macro for producing different variants of Uids
49 #define MDA_UID(uid_name) const TUint uid_name##Value = uid_name##Define; \
50 const TUid uid_name = {uid_name##Value};
61 const TInt KUidMediaServerLibraryValue = KUidMediaServerLibraryUnicodeDefine;
70 const TInt KUidMediaServerLibraryValue = KUidMediaServerLibraryDefine;
79 const TUid KUidMediaServerLibrary = {KUidMediaServerLibraryValue};
87 const TInt KMdaUnknown = -1;
95 Abstract base class for all media server package types.
97 This class has no user accessible functions.
102 inline TPtr8& Package();
103 inline const TPtr8& Package() const;
105 TMdaRawPackage(TInt aDerivedSize);
106 inline void SetSize(TInt aDerivedSize);
115 A data structure used to package messages (that include the package type) sent between the media server
118 This class is abstract. It defines the attributes common to packages where the derived class's type needs
119 to be sent as part of the package. The attributes are a UID that identifies the package's concrete class
120 (so that the server can construct objects of the correct type), and a UID that identifies the package type
121 (the category of classes to which the package belongs). The package type is little used in practice. These
122 attributes and the derived class's size are set during construction of the derived class.
124 class TMdaPackage : public TMdaRawPackage
127 inline TUid Type() const;
128 inline TUid Uid() const;
129 inline void SetUid(TUid aUid);
130 inline TBool operator==(const TMdaPackage& aPackage); // Type&Uid comparison
132 inline TMdaPackage(TUid aType, TUid aUid, TInt aDerivedSize);
143 * Media server event identification - Not used in MMF
160 class TMdaObjectEvent
174 class TMdaEventPackage : public TMdaRawPackage
177 inline TMdaEventPackage(); // For single events
179 inline TInt EventCount() const;
180 inline TInt MaxEvents() const;
181 inline const TMdaEvent& Event(); // First event only
182 inline const TMdaEvent& Event(TInt aIndex);
183 inline TInt EventFrom(); // first event only
184 inline TInt EventFrom(TInt aIndex);
186 inline TMdaEventPackage(TInt aMaxEvents);
190 TMdaObjectEvent iFirstEvent;
193 #include <mda/common/base.inl>
195 #include <mmf/common/mmfbase.h>