Main Page Class Hierarchy Data Structures File List Data Fields Globals

# CPV2WayInterface Class Reference

`#include <pv_2way_interface.h>`

## Public Methods
virtual | ~CPV2WayInterface ()
virtual OSCL_IMPORT_REF PVCommandId | GetSDKInfo (PVSDKInfo &aSDKInfo, OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | GetSDKModuleInfo (PVSDKModuleInfo &aSDKModuleInfo, OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | Init (PV2WayInitInfo &aInitInfo, OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | Reset (OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | AddDataSource (PVTrackId aTrackId, PVMFNodeInterface &aDataSource, OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | RemoveDataSource (PVMFNodeInterface &aDataSource, OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | AddDataSink (PVTrackId aTrackId, PVMFNodeInterface &aDataSink, OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | RemoveDataSink (PVMFNodeInterface &aDataSink, OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | Connect (const PV2WayConnectOptions &aOptions, PVMFNodeInterface *aCommServer=NULL, OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | Disconnect (OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | GetState (PV2WayState &aState, OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | Pause (PV2WayDirection aDirection, PVTrackId aTrackId, OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | Resume (PV2WayDirection aDirection, PVTrackId aTrackId, OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | SetLogAppender (const char *aTag, OsclSharedPtr< PVLoggerAppender > &aAppender, OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | RemoveLogAppender (const char *aTag, OsclSharedPtr< PVLoggerAppender > &aAppender, OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | SetLogLevel (const char *aTag, int32 aLevel, bool aSetSubtree=false, OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | GetLogLevel (const char *aTag, int32 &aLogInfo, OsclAny *aContextData=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | QueryInterface (const PVUuid &aUuid, PVInterface *&aInterfacePtr, OsclAny *aContext=NULL)=0
virtual OSCL_IMPORT_REF PVCommandId | CancelAllCommands (OsclAny *aContextData=NULL)=0

## Detailed Description

CPV2WayInterface Class

CPV2WayInterface is the interface to the pv2way SDK, which allows initialization, control, and termination of a two-way (3g-324m, SIP) terminal. The application is expected to contain and maintain a pointer to the CPV2WayInterface instance at all times that a call is active. The CPV2WayFactory factory class is to be used to create and delete instances of this class

## Constructor & Destructor Documentation

virtual CPV2WayInterface::~CPV2WayInterface | ( |  | ) | `[inline, virtual]`

| Object destructor function Releases Resources prior to destruction

## Member Function Documentation

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::AddDataSink | ( | PVTrackId | aTrackId,
|  | PVMFNodeInterface & | aDataSink,
|  | OsclAny * | aContextData = NULL
| ) | `[pure virtual]`

  | This function allows the user to specify the media sink for an incoming track. AddDataSinkL can be called only for established incoming tracks identified by a unique track id. Incoming tracks are initiated by the peer and their establishment is indicated using the PVT_INDICATION_INCOMING_TRACK notification which provides the media type and a unique track id. The format type is indicated using the PV2WayTrackInfoInterface extension interface in the PVAsyncInformationalEvent. Data sinks could be of the following types: a)raw media sinks like video display sinks for RGB and YUV formats, audio rendering sinks for PCM. b)sources of compressed data like file, combined decode and render devices. Parameters:
  aTrackId | Indicates the unique track id to be associated with this sink.
  aDataSink | The data sink to be added
  aContextData | Optional opaque data that will be passed back to the user with the command response
Returns: A unique command id for asynchronous completion

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::AddDataSource | ( | PVTrackId | aTrackId,
|  | PVMFNodeInterface & | aDataSource,
|  | OsclAny * | aContextData = NULL
| ) | `[pure virtual]`

  | This function allows the user to specify the media source for an outgoing track. Sources should be added after the PVT_INDICATION_OUTGOING_TRACK is received which specifies the format type and the unique track id. The format type is indicated using the PV2WayTrackInfoInterface extension interface in the PVAsyncInformationalEvent. Data sources could be of the following types: a)raw media sources like camera, microphone etc. b)sources of compressed data like file, combined capture and encode devices. Parameters:
  aTrackId | The outgoing track id
  aDataSource | Reference to the data source for this track
  aContextData | Optional opaque data that will be passed back to the user with the command response @leave This method can leave with one of the following error codes PVMFErrNotSupported if the format of the sources/sinks is incomtible with what the SDK can handle KPVErrInvalidState if invoked in the incorrect state KErrNoMemory if the SDK failed to allocate memory during this operation
Returns: A unique command id for asynchronous completion

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::CancelAllCommands | ( | OsclAny * | aContextData = NULL | ) | `[pure virtual]`

  | This API is to allow the user to cancel all pending requests. The current request being processed, if any, will also be aborted. Parameters:
  aContextData | Optional opaque data that will be passed back to the user with the command response
Returns: A unique command id for asynchronous completion

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::Connect | ( | const PV2WayConnectOptions & | aOptions,
|  | PVMFNodeInterface * | aCommServer = NULL,
|  | OsclAny * | aContextData = NULL
| ) | `[pure virtual]`

  | This function can be invoked only in the ESetup state. The terminal starts connecting with the remote terminal based on the specified options and capabilities. Incoming tracks may be opened before ConnectL completes and will be indicated via the PVT_INDICATION_INCOMING_TRACK event. Parameters:
  aOptions | Optional additional information for call setup.
  aCommServer | An optional pointer to a comm server to provide comm source and sink end-points.
  aContextData | Optional opaque data that will be passed back to the user with the command response
Returns: A unique command id for asynchronous completion

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::Disconnect | ( | OsclAny * | aContextData = NULL | ) | `[pure virtual]`

  | The Disconnect call is valid only when invoked in the EConnecting, and EConnected states. It causes the terminal to transition to the EDisconnecting state. All the media tracks both incoming and outgoing will be closed on invoking Disconnect. On completion, the terminal goes to the ESetup state. The statistics of the previous call shall still be available until Connect is invoked again. It is a no-op when called in any other state. The post disconnect option specifies what this terminal wishes to do after the data call is terminated, whether it wants to disconnect the line or continue the call as a voice only call. This is an asynchronous request. Parameters:
  aContextData | Optional opaque data that will be passed back to the user with the command response
Returns: A unique command id for asynchronous completion

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::GetLogLevel | ( | const char * | aTag,
|  | int32 & | aLogInfo,
|  | OsclAny * | aContextData = NULL
| ) | `[pure virtual]`

  | Allows the logging level to be queried for a particular logging tag. A larger log level will result in more messages being logged. In the asynchronous response, this should return the log level along with an indication of where the level was inherited (i.e., the ancestor tag). Parameters:
  aTag | Specifies the logger tree tag where the log level should be retrieved.
  aLogInfo | an output parameter which will be filled in with the log level information.
  aContextData | Optional opaque data that will be passed back to the user with the command response
  Exceptions:
  memory_error | leaves on memory allocation error.
Returns: A unique command id for asynchronous completion

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::GetSDKInfo | ( | PVSDKInfo & | aSDKInfo,
|  | OsclAny * | aContextData = NULL
| ) | `[pure virtual]`

  | Returns version information about the SDK Parameters:
  aSDKInfo | A reference to a PVSDKInfo structure which contains the product label and date
  aContextData | Optional opaque data that will be passed back to the user with the command response @leave This method can leave with one of the following error codes PVMFErrNoMemory if the SDK failed to allocate memory during this operation
Returns: A unique command id for asynchronous completion

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::GetSDKModuleInfo | ( | PVSDKModuleInfo & | aSDKModuleInfo,
|  | OsclAny * | aContextData = NULL
| ) | `[pure virtual]`

  | Returns information about all modules currently used by the SDK. Parameters:
  aSDKModuleInfo | A reference to a PVSDKModuleInfo structure which contains the number of modules currently used by pv2way SDK and the PV UID and description string for each module. The PV UID and description string for modules will be returned in one string buffer allocated by the client. If the string buffer is not large enough to hold the all the module's information, the information will be written up to the length of the buffer and truncated.
  aContextData | Optional opaque data that will be passed back to the user with the command response @leave This method can leave with one of the following error codes PVMFErrNoMemory if the SDK failed to allocate memory during this operation
Returns: A unique command id for asynchronous completion

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::GetState | ( | PV2WayState & | aState,
|  | OsclAny * | aContextData = NULL
| ) | `[pure virtual]`

  | This function returns the current state of the pv2way. Application may use this info for updating display or determine if the pv2way is ready for the next request. Parameters:
  aState | Reflects the state of the PV 2Way engine when the command was received.
  aContextData | Optional opaque data that will be passed back to the user with the command response
Returns: value indicating the current pv2way state

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::Init | ( | PV2WayInitInfo & | aInitInfo,
|  | OsclAny * | aContextData = NULL
| ) | `[pure virtual]`

  | This function is valid only in the EIdle state. It is a no-op when invoked in any other state. It causes the pv2way to transition to the ESetup state. The terminal remains in the EInitializing state during the transition. While initializing, the pv2way tries to allocate system resources needed for a two-way call. If it fails for some reason, and the pv2way reverts to the EIdle state. All the resources are de-allocated. Parameters:
  aInitInfo | A reference to a CPV2WayInitInfo structure which contains the capabilities of the applications sinks and sources to handle compressed and uncompressed formats.
  aContextData | Optional opaque data that will be passed back to the user with the command response @leave This method can leave with one of the following error codes PVMFErrArgument if more tx and rx codecs are set than engine can handle, or the mandatory codecs are not in the list. PVMFErrNotSupported if the format of the sources/sinks is incomtible with what the SDK can handle PVMFErrInvalidState if invoked in the incorrect state PVMFErrNoMemory if the SDK failed to allocate memory during this operation
Returns: A unique command id for asynchronous completion

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::Pause | ( | PV2WayDirection | aDirection,
|  | PVTrackId | aTrackId,
|  | OsclAny * | aContextData = NULL
| ) | `[pure virtual]`

  | For an incoming track this function pauses sending media to the sink (output device) and stops the sink. For outgoing, it pauses the sending of media from the source and stops the source. Parameters:
  aDirection | Specifies the direction of the track - incoming or outgoing
  aTrackId | Specifies which track is to be paused.
  aContextData | Optional opaque data that will be passed back to the user with the command response
Returns: A unique command id for asynchronous completion

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::QueryInterface | ( | const PVUuid & | aUuid,
|  | PVInterface *& | aInterfacePtr,
|  | OsclAny * | aContext = NULL
| ) | `[pure virtual]`

  | This API is to allow for extensibility of the pv2way interface. It allows a caller to ask for an instance of a particular interface object to be returned. The mechanism is analogous to the COM IUnknown method. The interfaces are identified with an interface ID that is a UUID as in DCE and a pointer to the interface object is returned if it is supported. Otherwise the returned pointer is NULL. TBD: Define the UIID, InterfacePtr structures Parameters:
  aUuid | The UUID of the desired interface
  aInterfacePtr | The output pointer to the desired interface
  Exceptions:
  not_supported | leaves if the specified interface id is not supported.

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::RemoveDataSink | ( | PVMFNodeInterface & | aDataSink,
|  | OsclAny * | aContextData = NULL
| ) | `[pure virtual]`

  | This function unbinds a previously added sink. Parameters:
  aDataSink | pointer to the media sink node
  aContextData | Optional opaque data that will be passed back to the user with the command response
Returns: A unique command id for asynchronous completion

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::RemoveDataSource | ( | PVMFNodeInterface & | aDataSource,
|  | OsclAny * | aContextData = NULL
| ) | `[pure virtual]`

  | This function unbinds a previously added source. Parameters:
  aDataSource | pointer to the media source node
  aContextData | Optional opaque data that will be passed back to the user with the command response
Returns: A unique command id for asynchronous completion

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::RemoveLogAppender | ( | const char * | aTag,
|  | OsclSharedPtr< PVLoggerAppender > & | aAppender,
|  | OsclAny * | aContextData = NULL
| ) | `[pure virtual]`

  | Allows a logging appender to be removed from the logger tree at the point specified by the input tag. The input tag cannot be NULL. Parameters:
  aTag | Specifies the logger tree tag where the appender should be removed.
  aAppender | The log appender to remove. Must be a reference to the same object that was set.
  aContextData | Optional opaque data that will be passed back to the user with the command response
  Exceptions:
  memory_error | leaves on memory allocation error.
Returns: A unique command id for asynchronous completion

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::Reset | ( | OsclAny * | aContextData = NULL | ) | `[pure virtual]`

  | This function is valid only in the ESetup and EInitializing state. It is a no-op when invoked in the EIdle state and returns PVMFErrInvalidState if invoked in any other state. It causes the pv2way to transition back to the EIdle state. The terminal remains in the EResetting state during the transition. While resetting, the pv2way de-allocates all resources resources that had been previously allocated. When it completes, ResetComplete is called and the pv2way reverts to the EIdle state. Parameters:
  aContextData | Optional opaque data that will be passed back to the user with the command response @leave This method can leave with one of the following error codes PVMFErrInvalidState if invoked in the incorrect state PVMFErrNoMemory if the SDK failed to allocate memory during this operation
Returns: A unique command id for asynchronous completion

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::Resume | ( | PV2WayDirection | aDirection,
|  | PVTrackId | aTrackId,
|  | OsclAny * | aContextData = NULL
| ) | `[pure virtual]`

  | Resume a previously paused incoming or outgoing track. For incoming, this function starts resumes playing out the media to the appropriate sink based on the current settings. For outgoing it resumes encoding and sending media from the source. Parameters:
  aDirection | Specifies the direction of the track - incoming or outgoing
  aTrackId | Specifies which track is to be paused.
  aContextData | Optional opaque data that will be passed back to the user with the command response
Returns: A unique command id for asynchronous completion

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::SetLogAppender | ( | const char * | aTag,
|  | OsclSharedPtr< PVLoggerAppender > & | aAppender,
|  | OsclAny * | aContextData = NULL
| ) | `[pure virtual]`

  | Allows a logging appender to be attached at some point in the logger tag tree. The location in the tag tree is specified by the input tag string. A single appender can be attached multiple times in the tree, but it may result in duplicate copies of log messages if the appender is not attached in disjoint portions of the tree. A logging appender is responsible for actually writing the log message to its final location (e.g., memory, file, network, etc). This API can be called anytime after creation of the terminal. Parameters:
  aTag | Specifies the logger tree tag where the appender should be attached.
  aAppender | The log appender to attach.
  aContextData | Optional opaque data that will be passed back to the user with the command response
  Exceptions:
  memory_error | leaves on memory allocation error.
Returns: A unique command id for asynchronous completion

virtual OSCL_IMPORT_REF PVCommandId CPV2WayInterface::SetLogLevel | ( | const char * | aTag,
|  | int32 | aLevel,
|  | bool | aSetSubtree = false,
|  | OsclAny * | aContextData = NULL
| ) | `[pure virtual]`

  | Allows the logging level to be set for the logging node specified by the tag. A larger log level will result in more messages being logged. A message will only be logged if its level is LESS THAN or equal to the current log level. The set_subtree flag will allow an entire subtree, with the specified tag as the root, to be reset to the specified value. Parameters:
  aTag | Specifies the logger tree tag where the log level should be set.
  aLevel | Specifies the log level to set.
  aSetSubtree | Specifies whether the entire subtree with aTag as the root should be reset to the log level.
  aContextData | Optional opaque data that will be passed back to the user with the command response
  Exceptions:
  memory_error | leaves on memory allocation error.
Returns: A unique command id for asynchronous completion

The documentation for this class was generated from the following file:

- pv_2way_interface.h