Differential D11968 Diff 31909 src/core-impl/collections/mediadevicecollection/handler/MediaDeviceHandler.h
Changeset View
Changeset View
Standalone View
Standalone View
src/core-impl/collections/mediadevicecollection/handler/MediaDeviceHandler.h
Show First 20 Lines • Show All 375 Lines • ▼ Show 20 Line(s) | 364 | public: | |||
---|---|---|---|---|---|
376 | virtual ~ParseWorkerThread(); | 376 | virtual ~ParseWorkerThread(); | ||
377 | 377 | | |||
378 | /** | 378 | /** | ||
379 | * Sees the success variable, which says whether or not the copy completed | 379 | * Sees the success variable, which says whether or not the copy completed | ||
380 | successfully. | 380 | successfully. | ||
381 | * @return Whether or not the copy was successful, i.e. m_success | 381 | * @return Whether or not the copy was successful, i.e. m_success | ||
382 | */ | 382 | */ | ||
383 | 383 | | |||
384 | virtual bool success() const; | 384 | virtual bool success() const override; | ||
385 | 385 | | |||
386 | Q_SIGNALS: | 386 | Q_SIGNALS: | ||
387 | /** This signal is emitted when this job is being processed by a thread. */ | 387 | /** This signal is emitted when this job is being processed by a thread. */ | ||
388 | void started(ThreadWeaver::JobPointer); | 388 | void started(ThreadWeaver::JobPointer); | ||
389 | /** This signal is emitted when the job has been finished (no matter if it succeeded or not). */ | 389 | /** This signal is emitted when the job has been finished (no matter if it succeeded or not). */ | ||
390 | void done(ThreadWeaver::JobPointer); | 390 | void done(ThreadWeaver::JobPointer); | ||
391 | /** This job has failed. | 391 | /** This job has failed. | ||
392 | * This signal is emitted when success() returns false after the job is executed. */ | 392 | * This signal is emitted when success() returns false after the job is executed. */ | ||
393 | void failed(ThreadWeaver::JobPointer); | 393 | void failed(ThreadWeaver::JobPointer); | ||
394 | 394 | | |||
395 | private Q_SLOTS: | 395 | private Q_SLOTS: | ||
396 | /** | 396 | /** | ||
397 | * Is called when the job is done successfully, and simply | 397 | * Is called when the job is done successfully, and simply | ||
398 | * calls Collection's emitCollectionReady() | 398 | * calls Collection's emitCollectionReady() | ||
399 | * @param job The job that was done | 399 | * @param job The job that was done | ||
400 | */ | 400 | */ | ||
401 | 401 | | |||
402 | void slotDoneSuccess( ThreadWeaver::JobPointer ); | 402 | void slotDoneSuccess( ThreadWeaver::JobPointer ); | ||
403 | 403 | | |||
404 | protected: | 404 | protected: | ||
405 | /** | 405 | /** | ||
406 | * Reimplemented, simply runs the parse method. | 406 | * Reimplemented, simply runs the parse method. | ||
407 | */ | 407 | */ | ||
408 | virtual void run(ThreadWeaver::JobPointer self = QSharedPointer<ThreadWeaver::Job>(), ThreadWeaver::Thread *thread = 0) Q_DECL_OVERRIDE; | 408 | virtual void run(ThreadWeaver::JobPointer self = QSharedPointer<ThreadWeaver::Job>(), ThreadWeaver::Thread *thread = 0) override; | ||
409 | void defaultBegin(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) Q_DECL_OVERRIDE; | 409 | void defaultBegin(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) override; | ||
410 | void defaultEnd(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) Q_DECL_OVERRIDE; | 410 | void defaultEnd(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) override; | ||
411 | 411 | | |||
412 | private: | 412 | private: | ||
413 | bool m_success; ///< Whether or not the parse was successful | 413 | bool m_success; ///< Whether or not the parse was successful | ||
414 | MediaDeviceHandler *m_handler; ///< The handler | 414 | MediaDeviceHandler *m_handler; ///< The handler | ||
415 | }; | 415 | }; | ||
416 | 416 | | |||
417 | /** | 417 | /** | ||
418 | * The CopyWorkerThread is used to run a copy operation on a single track in a separate thread. | 418 | * The CopyWorkerThread is used to run a copy operation on a single track in a separate thread. | ||
Show All 21 Lines | 428 | public: | |||
440 | 440 | | |||
441 | virtual ~CopyWorkerThread(); | 441 | virtual ~CopyWorkerThread(); | ||
442 | 442 | | |||
443 | /** | 443 | /** | ||
444 | * Sets the success variable, which says whether or not the copy completed successfully. | 444 | * Sets the success variable, which says whether or not the copy completed successfully. | ||
445 | * @return Whether or not the copy was successful, i.e. m_success | 445 | * @return Whether or not the copy was successful, i.e. m_success | ||
446 | */ | 446 | */ | ||
447 | 447 | | |||
448 | virtual bool success() const; | 448 | virtual bool success() const override; | ||
449 | 449 | | |||
450 | Q_SIGNALS: | 450 | Q_SIGNALS: | ||
451 | 451 | | |||
452 | /** | 452 | /** | ||
453 | * Is emitted when the job is done successfully | 453 | * Is emitted when the job is done successfully | ||
454 | * @param job The job that was done | 454 | * @param job The job that was done | ||
455 | * @param track The source track used for the copy | 455 | * @param track The source track used for the copy | ||
456 | */ | 456 | */ | ||
Show All 31 Lines | 475 | private Q_SLOTS: | |||
488 | */ | 488 | */ | ||
489 | 489 | | |||
490 | void slotDoneFailed( ThreadWeaver::JobPointer ); | 490 | void slotDoneFailed( ThreadWeaver::JobPointer ); | ||
491 | 491 | | |||
492 | protected: | 492 | protected: | ||
493 | /** | 493 | /** | ||
494 | * Reimplemented, simply runs the copy track method. | 494 | * Reimplemented, simply runs the copy track method. | ||
495 | */ | 495 | */ | ||
496 | virtual void run(ThreadWeaver::JobPointer self = QSharedPointer<ThreadWeaver::Job>(), ThreadWeaver::Thread *thread = 0) Q_DECL_OVERRIDE; | 496 | virtual void run(ThreadWeaver::JobPointer self = QSharedPointer<ThreadWeaver::Job>(), ThreadWeaver::Thread *thread = 0) override; | ||
497 | void defaultBegin(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) Q_DECL_OVERRIDE; | 497 | void defaultBegin(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) override; | ||
498 | void defaultEnd(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) Q_DECL_OVERRIDE; | 498 | void defaultEnd(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) override; | ||
499 | 499 | | |||
500 | private: | 500 | private: | ||
501 | bool m_success; ///< Whether or not the copy was successful | 501 | bool m_success; ///< Whether or not the copy was successful | ||
502 | Meta::TrackPtr m_track; ///< The source track to copy from | 502 | Meta::TrackPtr m_track; ///< The source track to copy from | ||
503 | MediaDeviceHandler *m_handler; ///< The handler | 503 | MediaDeviceHandler *m_handler; ///< The handler | ||
504 | }; | 504 | }; | ||
505 | 505 | | |||
506 | } | 506 | } | ||
507 | #endif | 507 | #endif |