MultimediaService.h 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 synchronize();
  26. void reset();
  27. void musicPlayerRequestFileNames();
  28. void deviceWatcherCheckStatus(const int type);
  29. void musicPlayerSetPlayModeToggle();
  30. void musicPlayerSetPlayMode(const int mode);
  31. void musicPlayerSetPlayStatusToggle();
  32. void musicPlayerSetPlayStatus(const int status);
  33. void musicPlayerPlayListViewIndex(const int type, const int index, const int millesimal);
  34. void musicPlayerPlayPreviousListViewIndex();
  35. void musicPlayerPlayNextListViewIndex();
  36. void musicPlayerSeekToMillesimal(const int millesimal);
  37. void musicPlayerExit();
  38. void imagePlayerRequestFileNames(const int type);
  39. void imagePlayerPlayListViewIndex(const int type, const int index);
  40. void imagePlayerPlayPreviousListViewIndex();
  41. void imagePlayerPlayNextListViewIndex();
  42. void imagePlayerRotateImage();
  43. void imagePlayerZoomInImage();
  44. void imagePlayerZoomOutImage();
  45. void videoPlayerRequestFileNames(const int type);
  46. void videoPlayerSetPlayModeToggle();
  47. void videoPlayerSetPlayStatusToggle();
  48. void videoPlayerSetPlayStatus(const int status);
  49. void videoPlayerPlayListViewIndex(const int type, const int index, const int x, const int y, const int width, const int height, const int millesimal);
  50. void videoPlayerPlayPreviousListViewIndex();
  51. void videoPlayerPlayNextListViewIndex();
  52. void videoPlayerSeekToMillesimal(const int millesimal);
  53. void videoPlayerExit();
  54. void videoPlayerVisible(const bool flag);
  55. signals:
  56. void onDeviceWatcherStatus(const int type, const int status);
  57. void onMusicPlayerPlayMode(const int mode);
  58. void onMusicPlayerPlayStatus(const int type, const int status);
  59. void onMusicPlayerElapsedInformation(const int elapsedTime,
  60. const int elapsedMillesimal);
  61. void onMusicPlayerID3TagChange(const int type,
  62. const int index,
  63. const QString &fileName,
  64. const QString& title,
  65. const QString& artist,
  66. const QString& album,
  67. const int endTime);
  68. // void onMusicPlayerFilePath(const int type, const QString& path);
  69. void onMusicPlayerFileNames(const int type, const QString &xml);
  70. void onImagePlayerFileNames(const int type, const QString &xml);
  71. void onImagePlayerChange(const int type, const QString &filePath, const int index, const int percent, const int rotate);
  72. void onVideoPlayerPlayMode(const int mode);
  73. void onVideoPlayerShowStatus(const int status);
  74. void onVideoPlayerPlayStatus(const int type, const int status);
  75. void onVideoPlayerFileNames(const int type, const QString& xml);
  76. void onVideoPlayerInformation(const int type, const int index, const QString &fileName, const int endTime);
  77. void onVideoPlayerElapsedInformation(const int elapsedTime, const int elapsedMillesimal);
  78. void onVideoPlayerVisible(const bool flag);
  79. void onSliderTouchEnable(const bool flag); // dll add 20190805
  80. void onMusicPlayerFileArtist(const int type,QStringList artistList);
  81. private:
  82. friend class MultimediaServicePrivate;
  83. QScopedPointer<MultimediaServicePrivate> m_Private;
  84. };
  85. #endif // MULTIMEDIASERVICE_H