Home | History | Annotate | Download | only in src
      1 /* ------------------------------------------------------------------
      2  * Copyright (C) 1998-2009 PacketVideo
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
     13  * express or implied.
     14  * See the License for the specific language governing permissions
     15  * and limitations under the License.
     16  * -------------------------------------------------------------------
     17  */
     18 
     19 #ifndef PV_2WAY_INTERFACE_CMD_MESSAGES_H_INCLUDED
     20 #define PV_2WAY_INTERFACE_CMD_MESSAGES_H_INCLUDED
     21 
     22 #ifndef OSCL_TYPES_H_INCLUDED
     23 #include "oscl_types.h"
     24 #endif
     25 
     26 #ifndef PV_INTERFACE_MESSAGE_H_INCLUDED
     27 #include "pv_interface_cmd_message.h"
     28 #endif
     29 
     30 #ifndef PV_2WAY_INTERFACE_H_INCLUDED
     31 #include "pv_2way_interface.h"
     32 #endif
     33 
     34 #ifndef PV_2WAY_ENGINE_H_INCLUDED
     35 #include "pv_2way_engine.h"
     36 #endif
     37 
     38 /*
     39 #ifndef PV_2WAY_SYMBIAN_INTERFACE_H_INCLUDED
     40 #include "pv_2way_symbian_interface.h"
     41 #endif
     42 
     43 #ifndef PV_COMMON_SYMBIAN_TYPES_H_INCLUDED
     44 #include "pv_common_symbian_types.h"
     45 #endif
     46 */
     47 
     48 class PV2WayMessageGetSDKInfo : public CPVCmnInterfaceCmdMessage
     49 {
     50     public:
     51         PV2WayMessageGetSDKInfo(PVSDKInfo &aSDKInfo, OsclAny* aContextData)
     52                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_GET_SDK_INFO, aContextData)
     53                 , iSDKInfo(aSDKInfo)
     54         {
     55         }
     56 
     57         PVSDKInfo &iSDKInfo;
     58 };
     59 
     60 class PV2WayMessageGetSDKModuleInfo : public CPVCmnInterfaceCmdMessage
     61 {
     62     public:
     63         PV2WayMessageGetSDKModuleInfo(PVSDKModuleInfo &aSDKModuleInfo, OsclAny* aContextData)
     64                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_GET_SDK_MODULE_INFO, aContextData)
     65                 , iSDKModuleInfo(aSDKModuleInfo)
     66         {
     67         }
     68 
     69         PVSDKModuleInfo &iSDKModuleInfo;
     70 };
     71 
     72 
     73 class PV2WayMessageInit : public CPVCmnInterfaceCmdMessage
     74 {
     75     public:
     76         PV2WayMessageInit(PV2WayInitInfo& aInitInfo, OsclAny* aContextData)
     77                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_INIT, aContextData)
     78                 , iInitInfo(aInitInfo)
     79         {
     80         }
     81 
     82         PV2WayInitInfo& iInitInfo;
     83 };
     84 
     85 class PV2WayMessageReset : public CPVCmnInterfaceCmdMessage
     86 {
     87     public:
     88         PV2WayMessageReset(OsclAny* aContextData)
     89                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_RESET, aContextData)
     90         {
     91         }
     92 
     93 };
     94 
     95 class PV2WayMessageAddDataSource : public CPVCmnInterfaceCmdMessage
     96 {
     97     public:
     98         PV2WayMessageAddDataSource(PVTrackId aTrackId, PVMFNodeInterface& aDataSource, OsclAny* aContextData)
     99                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_ADD_DATA_SOURCE, aContextData)
    100                 , iTrackId(aTrackId)
    101                 , iDataSource(aDataSource)
    102         {
    103         }
    104 
    105         PVTrackId iTrackId;
    106         PVMFNodeInterface& iDataSource;
    107 };
    108 
    109 class PV2WayMessageRemoveDataSource : public CPVCmnInterfaceCmdMessage
    110 {
    111     public:
    112         PV2WayMessageRemoveDataSource(PVMFNodeInterface& aDataSource, OsclAny* aContextData)
    113                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_REMOVE_DATA_SOURCE, aContextData)
    114                 , iDataSource(aDataSource)
    115         {
    116         }
    117 
    118         PVMFNodeInterface& iDataSource;
    119 };
    120 
    121 class PV2WayMessageAddDataSink : public CPVCmnInterfaceCmdMessage
    122 {
    123     public:
    124         PV2WayMessageAddDataSink(PVTrackId aTrackId, PVMFNodeInterface& aDataSink, OsclAny* aContextData)
    125                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_ADD_DATA_SINK, aContextData)
    126                 , iTrackId(aTrackId)
    127                 , iDataSink(aDataSink)
    128         {
    129         }
    130 
    131         PVTrackId iTrackId;
    132         PVMFNodeInterface& iDataSink;
    133 };
    134 
    135 class PV2WayMessageRemoveDataSink : public CPVCmnInterfaceCmdMessage
    136 {
    137     public:
    138         PV2WayMessageRemoveDataSink(PVMFNodeInterface& aDataSink, OsclAny* aContextData)
    139                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_REMOVE_DATA_SINK, aContextData)
    140                 , iDataSink(aDataSink)
    141         {
    142         }
    143 
    144         PVMFNodeInterface& iDataSink;
    145 };
    146 
    147 class PV2WayMessageConnect : public CPVCmnInterfaceCmdMessage
    148 {
    149     public:
    150         PV2WayMessageConnect(const PV2WayConnectOptions& aOptions, PVMFNodeInterface* aCommServer, OsclAny* aContextData)
    151                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_CONNECT, aContextData)
    152                 , iConnectOptions(aOptions),
    153                 iCommServer(aCommServer)
    154         {
    155         }
    156 
    157         const PV2WayConnectOptions& iConnectOptions;
    158         PVMFNodeInterface* iCommServer;
    159 };
    160 
    161 
    162 class PV2WayMessageDisconnect : public CPVCmnInterfaceCmdMessage
    163 {
    164     public:
    165         PV2WayMessageDisconnect(OsclAny* aContextData)
    166                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_DISCONNECT, aContextData)
    167         {
    168         }
    169 
    170 };
    171 
    172 class PV2WayMessageGetPV2WayState : public CPVCmnInterfaceCmdMessage
    173 {
    174     public:
    175         PV2WayMessageGetPV2WayState(PV2WayState& aState, OsclAny* aContextData)
    176                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_GET_PV2WAY_STATE, aContextData)
    177                 , iState(aState)
    178         {
    179         }
    180 
    181         PV2WayState& iState;
    182 };
    183 
    184 
    185 class PV2WayMessagePause : public CPVCmnInterfaceCmdMessage
    186 {
    187     public:
    188         PV2WayMessagePause(PV2WayDirection aDirection, PVTrackId aTrackId, OsclAny* aContextData)
    189                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_PAUSE, aContextData)
    190                 , iDirection(aDirection)
    191                 , iTrackId(aTrackId)
    192         {
    193         }
    194 
    195         PV2WayDirection iDirection;
    196         PVTrackId iTrackId;
    197 };
    198 
    199 
    200 class PV2WayMessageResume : public CPVCmnInterfaceCmdMessage
    201 {
    202     public:
    203         PV2WayMessageResume(PV2WayDirection aDirection, PVTrackId aTrackId, OsclAny* aContextData)
    204                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_RESUME, aContextData)
    205                 , iDirection(aDirection)
    206                 , iTrackId(aTrackId)
    207         {
    208         }
    209 
    210         PV2WayDirection iDirection;
    211         PVTrackId iTrackId;
    212 };
    213 
    214 
    215 class PV2WayMessageSetLogAppender : public CPVCmnInterfaceCmdMessage
    216 {
    217     public:
    218         PV2WayMessageSetLogAppender(OsclSharedPtr<char> &aTag, OsclSharedPtr<PVLoggerAppender> &aAppender, OsclAny* aContextData)
    219                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_SET_LOG_APPENDER, aContextData)
    220                 , iTag(aTag)
    221                 , iAppender(aAppender)
    222         {
    223         }
    224 
    225         OsclSharedPtr<char> iTag;
    226         OsclSharedPtr<PVLoggerAppender> iAppender;
    227 };
    228 
    229 
    230 class PV2WayMessageRemoveLogAppender : public CPVCmnInterfaceCmdMessage
    231 {
    232     public:
    233         PV2WayMessageRemoveLogAppender(OsclSharedPtr<char> &aTag, OsclSharedPtr<PVLoggerAppender> &aAppender, OsclAny* aContextData)
    234                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_REMOVE_LOG_APPENDER, aContextData)
    235                 , iTag(aTag)
    236                 , iAppender(aAppender)
    237         {
    238         }
    239 
    240         OsclSharedPtr<char> iTag;
    241         OsclSharedPtr<PVLoggerAppender> iAppender;
    242 };
    243 
    244 
    245 class PV2WayMessageSetLogLevel : public CPVCmnInterfaceCmdMessage
    246 {
    247     public:
    248         PV2WayMessageSetLogLevel(OsclSharedPtr<char> &aTag, int32 aLevel, bool aSetSubtree, OsclAny* aContextData)
    249                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_SET_LOG_LEVEL, aContextData)
    250                 , iTag(aTag)
    251                 , iSetSubtree(aSetSubtree)
    252                 , iLevel(aLevel)
    253         {
    254         }
    255 
    256         OsclSharedPtr<char> iTag;
    257         bool iSetSubtree;
    258         int32 iLevel;
    259 };
    260 
    261 
    262 class PV2WayMessageGetLogLevel : public CPVCmnInterfaceCmdMessage
    263 {
    264     public:
    265         PV2WayMessageGetLogLevel(OsclSharedPtr<char> &aTag, int32& aLogLevel, OsclAny* aContextData)
    266                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_GET_LOG_LEVEL, aContextData)
    267                 , iTag(aTag)
    268                 , iLogLevel(aLogLevel)
    269 
    270         {
    271         }
    272 
    273         OsclSharedPtr<char> iTag;
    274         int32& iLogLevel;
    275 };
    276 
    277 class PV2WayMessageQueryUUID : public CPVCmnInterfaceCmdMessage
    278 {
    279     public:
    280         PV2WayMessageQueryUUID(const PvmfMimeString& aMimeType, Oscl_Vector<PVUuid, BasicAlloc> &aUuids, bool aExactUuidsOnly, OsclAny* aContextData)
    281                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_QUERY_UUID, aContextData)
    282                 , iMimeType(aMimeType)
    283                 , iUuids(aUuids)
    284                 , iExactUuidsOnly(aExactUuidsOnly)
    285 
    286         {
    287         }
    288 
    289         const PvmfMimeString&  iMimeType;
    290         Oscl_Vector<PVUuid, BasicAlloc> &iUuids;
    291         bool iExactUuidsOnly;
    292 };
    293 
    294 
    295 class PV2WayMessageQueryInterface : public CPVCmnInterfaceCmdMessage
    296 {
    297     public:
    298         PV2WayMessageQueryInterface(const PVUuid& aUuid, PVInterface*& aInterfacePtr, OsclAny* aContextData)
    299                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_QUERY_INTERFACE, aContextData)
    300                 , iUuid(aUuid)
    301                 , iInterfacePtr(aInterfacePtr)
    302         {
    303         }
    304 
    305         PVUuid iUuid;
    306         PVInterface* &iInterfacePtr;
    307 };
    308 
    309 class PV2WayMessageCancelAllCommands : public CPVCmnInterfaceCmdMessage
    310 {
    311     public:
    312         PV2WayMessageCancelAllCommands(OsclAny* aContextData)
    313                 : CPVCmnInterfaceCmdMessage(PVT_COMMAND_CANCEL_ALL_COMMANDS, aContextData)
    314         {
    315         }
    316 
    317 };
    318 
    319 #endif
    320 
    321 
    322 
    323 
    324