epoc32/include/mda/common/base.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@4
     4
// under the terms of "Eclipse Public License v1.0"
williamr@2
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
// Mda\Common\Base.h
williamr@2
    15
// largely EMPTY - maintained for backwards compatibility
williamr@2
    16
// 
williamr@2
    17
//
williamr@2
    18
williamr@2
    19
#ifndef __MDA_COMMON_BASE_H__
williamr@2
    20
#define __MDA_COMMON_BASE_H__
williamr@2
    21
williamr@2
    22
/*
williamr@2
    23
Notes:
williamr@2
    24
Header file for information shared between client and server side
williamr@2
    25
Contains UID definitions, function numbers
williamr@2
    26
*/
williamr@2
    27
williamr@2
    28
// Standard EPOC32 includes
williamr@2
    29
#include <e32base.h>
williamr@2
    30
// Public Media Server includes
williamr@2
    31
#include <mda/common/base.hrh>
williamr@2
    32
williamr@2
    33
#ifdef ASSERT
williamr@2
    34
#ifdef _DEBUG
williamr@2
    35
#undef ASSERT
williamr@2
    36
williamr@2
    37
// Redefine assert to be a little more useful to us, i.e. to include file & line number
williamr@2
    38
#define __ASSERT_FILE__(s) _LIT(KPanicFileName,s)
williamr@2
    39
#define __ASSERT_PANIC__(l) User::Panic(KPanicFileName().Right(12),l)
williamr@2
    40
#define ASSERT(x) { __ASSERT_FILE__(__FILE__); __ASSERT_DEBUG(x, __ASSERT_PANIC__(__LINE__) ); }
williamr@2
    41
#endif
williamr@2
    42
#endif
williamr@2
    43
williamr@2
    44
/**
williamr@4
    45
 * @publishedAll
williamr@2
    46
 *
williamr@2
    47
 * Macro for producing different variants of Uids
williamr@2
    48
 */
williamr@2
    49
#define MDA_UID(uid_name)	const TUint uid_name##Value = uid_name##Define; \
williamr@2
    50
							const TUid uid_name = {uid_name##Value};
williamr@2
    51
williamr@2
    52
// Uids
williamr@2
    53
#if defined(UNICODE)
williamr@2
    54
williamr@2
    55
/**
williamr@2
    56
 * @publishedAll
williamr@2
    57
 * @deprecated 
williamr@2
    58
 *
williamr@2
    59
 * Not used in MMF
williamr@2
    60
 */
williamr@2
    61
const TInt KUidMediaServerLibraryValue = KUidMediaServerLibraryUnicodeDefine;
williamr@2
    62
#else
williamr@2
    63
williamr@2
    64
/**
williamr@2
    65
 * @publishedAll
williamr@2
    66
 * @deprecated 
williamr@2
    67
 *
williamr@2
    68
 * Not used in MMF
williamr@2
    69
 */
williamr@2
    70
const TInt KUidMediaServerLibraryValue = KUidMediaServerLibraryDefine;
williamr@2
    71
#endif
williamr@2
    72
williamr@2
    73
/**
williamr@2
    74
 * @publishedAll
williamr@2
    75
 * @deprecated
williamr@2
    76
 *
williamr@2
    77
 * Not used in MMF
williamr@2
    78
 */
williamr@2
    79
const TUid KUidMediaServerLibrary = {KUidMediaServerLibraryValue};
williamr@2
    80
williamr@2
    81
/** 
williamr@2
    82
 * @publishedAll
williamr@2
    83
 * @deprecated 
williamr@2
    84
 *
williamr@2
    85
 * Unknown value
williamr@2
    86
 */
williamr@2
    87
const TInt KMdaUnknown = -1;
williamr@2
    88
williamr@2
    89
// Package classes
williamr@2
    90
williamr@2
    91
/**
williamr@2
    92
@publishedAll
williamr@2
    93
@deprecated
williamr@2
    94
williamr@2
    95
Abstract base class for all media server package types.
williamr@2
    96
williamr@2
    97
This class has no user accessible functions.
williamr@2
    98
*/
williamr@2
    99
class TMdaRawPackage
williamr@2
   100
	{
williamr@2
   101
public:
williamr@2
   102
	inline TPtr8& Package();
williamr@2
   103
	inline const TPtr8& Package() const;
williamr@2
   104
protected:
williamr@2
   105
	TMdaRawPackage(TInt aDerivedSize);
williamr@2
   106
	inline void SetSize(TInt aDerivedSize);
williamr@2
   107
protected:
williamr@2
   108
	TPtr8 iThis;
williamr@2
   109
	};
williamr@2
   110
williamr@2
   111
/**
williamr@2
   112
@publishedAll
williamr@2
   113
@deprecated
williamr@2
   114
williamr@2
   115
A data structure used to package messages (that include the package type) sent between the media server 
williamr@2
   116
and its clients.
williamr@2
   117
williamr@2
   118
This class is abstract. It defines the attributes common to packages where the derived class's type needs 
williamr@2
   119
to be sent as part of the package. The attributes are a UID that identifies the package's concrete class 
williamr@2
   120
(so that the server can construct objects of the correct type), and a UID that identifies the package type 
williamr@2
   121
(the category of classes to which the package belongs). The package type is little used in practice. These 
williamr@2
   122
attributes and the derived class's size are set during construction of the derived class.
williamr@2
   123
*/
williamr@2
   124
class TMdaPackage : public TMdaRawPackage
williamr@2
   125
	{
williamr@2
   126
public:
williamr@2
   127
	inline TUid Type() const;
williamr@2
   128
	inline TUid Uid() const;
williamr@2
   129
	inline void SetUid(TUid aUid);
williamr@2
   130
	inline TBool operator==(const TMdaPackage& aPackage); // Type&Uid comparison
williamr@2
   131
protected:
williamr@2
   132
	inline TMdaPackage(TUid aType, TUid aUid, TInt aDerivedSize);
williamr@2
   133
private:
williamr@2
   134
	TUid iType;
williamr@2
   135
	TUid iUid;
williamr@2
   136
	};
williamr@2
   137
williamr@2
   138
/** 
williamr@2
   139
 *  
williamr@2
   140
 * @publishedAll
williamr@2
   141
 * @deprecated
williamr@2
   142
 *
williamr@2
   143
 * Media server event identification - Not used in MMF
williamr@2
   144
 */
williamr@2
   145
class TMdaEvent
williamr@2
   146
	{
williamr@2
   147
public:
williamr@2
   148
	TInt32 iId;
williamr@2
   149
	TInt32 iArg[3];
williamr@2
   150
	};
williamr@2
   151
williamr@2
   152
williamr@2
   153
/** 
williamr@2
   154
 *  
williamr@2
   155
 * @publishedAll
williamr@2
   156
 * @deprecated
williamr@2
   157
 *
williamr@2
   158
 * Not used in MMF
williamr@2
   159
 */
williamr@2
   160
class TMdaObjectEvent
williamr@2
   161
	{
williamr@2
   162
public:
williamr@2
   163
	TInt iHandle;
williamr@2
   164
	TMdaEvent iEvent;
williamr@2
   165
	};
williamr@2
   166
williamr@2
   167
/** 
williamr@2
   168
 *  
williamr@2
   169
 * @publishedAll
williamr@2
   170
 * @deprecated
williamr@2
   171
 *
williamr@2
   172
 * Not used in MMF
williamr@2
   173
 */
williamr@2
   174
class TMdaEventPackage : public TMdaRawPackage
williamr@2
   175
	{
williamr@2
   176
public:
williamr@2
   177
	inline TMdaEventPackage(); // For single events
williamr@2
   178
	//
williamr@2
   179
	inline TInt EventCount() const;
williamr@2
   180
	inline TInt MaxEvents() const;
williamr@2
   181
	inline const TMdaEvent& Event(); // First event only
williamr@2
   182
	inline const TMdaEvent& Event(TInt aIndex);
williamr@2
   183
	inline TInt EventFrom(); // first event only
williamr@2
   184
	inline TInt EventFrom(TInt aIndex);
williamr@2
   185
protected:
williamr@2
   186
	inline TMdaEventPackage(TInt aMaxEvents);
williamr@2
   187
protected:
williamr@2
   188
	TInt iMaxEvents;
williamr@2
   189
	TInt iValidEvents;
williamr@2
   190
	TMdaObjectEvent iFirstEvent;
williamr@2
   191
	};
williamr@2
   192
williamr@2
   193
#include <mda/common/base.inl>
williamr@2
   194
williamr@2
   195
#include <mmf/common/mmfbase.h>
williamr@2
   196
williamr@2
   197
#endif