MultimediaService.h 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #ifndef MULTIMEDIASERVICE_H
  2. #define MULTIMEDIASERVICE_H
  3. #include "MultimediaServiceProxy.h"
  4. #include "MultimediaPersistent.h"
  5. #include <QObject>
  6. #include <QScopedPointer>
  7. #define MultimediaApplication QString("-multimedia")
  8. #define ArkMicroMultimediaService QString("com.arkmicro.multimedia")
  9. #define ArkMicroMultimediaPath QString("/com/arkmicro/multimedia")
  10. #define ArkMicroMultimediaInterface QString("Local.DbusServer.Multimedia")
  11. class MultimediaServicePrivate;
  12. class MultimediaService : public QObject
  13. {
  14. Q_OBJECT
  15. Q_DISABLE_COPY(MultimediaService)
  16. Q_CLASSINFO("D-Bus Interface", "Local.DbusServer.Multimedia")
  17. #ifdef g_MultimediaService
  18. #undef g_MultimediaService
  19. #endif
  20. #define g_MultimediaService (MultimediaService::instance())
  21. public:
  22. explicit MultimediaService(QObject* parent = NULL);
  23. ~MultimediaService();
  24. public slots:
  25. void multimediaServiceStart();
  26. void synchronize();
  27. void reset();
  28. void musicPlayerRequestFileNames();
  29. void deviceWatcherCheckStatus(const int type);
  30. void musicPlayerSetPlayModeToggle();
  31. void musicPlayerSetPlayMode(const int mode);
  32. void musicPlayerSetPlayStatusToggle();
  33. void musicPlayerSetPlayStatus(const int status);
  34. void musicPlayerPlayListViewIndex(const int type, const int index, const int millesimal);
  35. void musicPlayerPlayPreviousListViewIndex();
  36. void musicPlayerPlayNextListViewIndex();
  37. void musicPlayerSeekToMillesimal(const int millesimal);
  38. void musicPlayerExit();
  39. void imagePlayerRequestFileNames(const int type);
  40. void imagePlayerPlayListViewIndex(const int type, const int index);
  41. void imagePlayerPlayPreviousListViewIndex();
  42. void imagePlayerPlayNextListViewIndex();
  43. void imagePlayerRotateImage();
  44. void imagePlayerZoomInImage();
  45. void imagePlayerZoomOutImage();
  46. void videoPlayerRequestFileNames(const int type);
  47. void videoPlayerSetPlayModeToggle();
  48. void videoPlayerSetPlayStatusToggle();
  49. void videoPlayerSetPlayStatus(const int status);
  50. void videoPlayerPlayListViewIndex(const int type, const int index, const int x, const int y, const int width, const int height, const int millesimal);
  51. void videoPlayerPlayPreviousListViewIndex();
  52. void videoPlayerPlayNextListViewIndex();
  53. void videoPlayerSeekToMillesimal(const int millesimal);
  54. void videoPlayerExit();
  55. void videoPlayerVisible(const bool flag);
  56. // void videoPlayerSetGeometry(int x,int y,int width,int height);
  57. void writeCmdToMplayer(QString cmd);
  58. signals:
  59. void onDeviceWatcherStatus(const int type, const int status);
  60. void onMusicPlayerPlayMode(const int mode);
  61. void onMusicPlayerPlayStatus(const int type, const int status);
  62. void onMusicPlayerElapsedInformation(const int elapsedTime,
  63. const int elapsedMillesimal);
  64. void onMusicPlayerID3TagChange(const int type,
  65. const int index,
  66. const QString &fileName,
  67. const QString& title,
  68. const QString& artist,
  69. const QString& album,
  70. const int endTime);
  71. // void onMusicPlayerFilePath(const int type, const QString& path);
  72. void onMusicPlayerFileNames(const int type, const QString &xml);
  73. void onImagePlayerFileNames(const int type, const QString &xml);
  74. void onImagePlayerChange(const int type, const QString &filePath, const int index, const int percent, const int rotate);
  75. void onVideoPlayerPlayMode(const int mode);
  76. void onVideoPlayerShowStatus(const int status);
  77. void onVideoPlayerPlayStatus(const int type, const int status);
  78. void onVideoPlayerFileNames(const int type, const QString& xml);
  79. void onVideoPlayerInformation(const int type, const int index, const QString &fileName, const int endTime);
  80. void onVideoPlayerElapsedInformation(const int elapsedTime, const int elapsedMillesimal);
  81. void onVideoPlayerVisible(const bool flag);
  82. void onSliderTouchEnable(const bool flag); // dll add 20190805
  83. void onMusicPlayerFileArtist(const int type,QStringList artistList);
  84. void onMusicPlayerExit();
  85. void onVideoPlayerExit();
  86. private:
  87. friend class MultimediaServicePrivate;
  88. QScopedPointer<MultimediaServicePrivate> m_Private;
  89. };
  90. #endif // MULTIMEDIASERVICE_H