Changeset View
Changeset View
Standalone View
Standalone View
resources/pop3/jobs.h
Show All 29 Lines | |||||
30 | 30 | | |||
31 | namespace KIO { | 31 | namespace KIO { | ||
32 | class Slave; | 32 | class Slave; | ||
33 | class Job; | 33 | class Job; | ||
34 | class TransferJob; | 34 | class TransferJob; | ||
35 | } | 35 | } | ||
36 | 36 | | |||
37 | class SlaveBaseJob; | 37 | class SlaveBaseJob; | ||
38 | class Settings; | ||||
38 | 39 | | |||
39 | class POPSession : public QObject | 40 | class POPSession : public QObject | ||
40 | { | 41 | { | ||
41 | Q_OBJECT | 42 | Q_OBJECT | ||
42 | public: | 43 | public: | ||
43 | explicit POPSession(const QString &password); | 44 | explicit POPSession(Settings &settings, const QString &password); | ||
44 | ~POPSession(); | 45 | ~POPSession(); | ||
45 | bool connectSlave(); | 46 | bool connectSlave(); | ||
46 | 47 | | |||
47 | void abortCurrentJob(); | 48 | void abortCurrentJob(); | ||
48 | void closeSession(); | 49 | void closeSession(); | ||
49 | 50 | | |||
50 | KIO::Slave *getSlave() const; | 51 | KIO::Slave *getSlave() const; | ||
51 | QUrl getUrl() const; | 52 | QUrl getUrl() const; | ||
Show All 13 Lines | |||||
65 | 66 | | |||
66 | private: | 67 | private: | ||
67 | KIO::MetaData slaveConfig() const; | 68 | KIO::MetaData slaveConfig() const; | ||
68 | QString authenticationToString(int type) const; | 69 | QString authenticationToString(int type) const; | ||
69 | 70 | | |||
70 | QPointer<KIO::Slave> mSlave; | 71 | QPointer<KIO::Slave> mSlave; | ||
71 | SlaveBaseJob *mCurrentJob = nullptr; | 72 | SlaveBaseJob *mCurrentJob = nullptr; | ||
72 | QString mPassword; | 73 | QString mPassword; | ||
74 | Settings &mSettings; | ||||
73 | }; | 75 | }; | ||
74 | 76 | | |||
75 | class SlaveBaseJob : public KJob | 77 | class SlaveBaseJob : public KJob | ||
76 | { | 78 | { | ||
77 | Q_OBJECT | 79 | Q_OBJECT | ||
78 | 80 | | |||
79 | public: | 81 | public: | ||
80 | explicit SlaveBaseJob(POPSession *POPSession); | 82 | explicit SlaveBaseJob(POPSession *POPSession); | ||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |