The object methods and arguments are presented without the SOM language syntax that is required for any given language to instance an object and call its methods. To write applications using media handler objects, you need to know the information included in the header files, the syntax of the enumerated types, and the specific language bindings of each language.
To learn more about programming with Ultimedia Services objects, see:
To access the methods of any object, you need to include the appropriate header files. In C, the files are named ObjectClassName.h and in C++ the files are named ObjectClassName.xh
UMSAudioPlayer.h /*C header file for the audio player/recorder*/ UMSAudioPlayer.xh /*C++ header file for the audio player/recorder*/
UMSMoviePlayer.h /*C header file for the movie player*/ UMSMoviePlayer.xh /*C++ header file for the movie player*/
The syntax for the enumerated types defined by an object must be referenced as follows:
ObjectClassName_EnumeratedType
UMSAudioPlayer_ReturnCode; /*audio player enum ReturnCode usage*/ UMSMoviePlayer_ReturnCode; /*movie player enum ReturnCode usage*/
Using a method in C requires a fully qualified method name, a receiver object, a value of type (Environment *), followed by the argument list. For example:
ObjectClassName_MethodName (objp, envp, args...);
Where args is the argument list of the method. The receiver object and the Environment pointer are not explicitly listed as parameters to the method. For example:
UMSAudioPlayer_open ( audioObj, envp, "Audio"); UMSMoviePlayer_open_audio ( movieObj, envp, "Audio");
Using a method in C++ requires a value of type (Environment *), followed by the argument list. For example:
obj->MethodName (envp, args...);
Where args is the argument list of the method. The Environment pointer is not explicitly listed as a parameter to the method. For example:
audioObj->open ( envp, "Audio"); movieObj->open_audio ( envp, "Audio");