18 lines
676 B
C++
18 lines
676 B
C++
// concreterequests.cpp
|
|||
|
|
#include "concreterequests.h"
|
||
|
|
#include <QDebug>
|
||
|
|
|
||
|
|
Request* Concreterequests::createRequest(const QString& type, const QString& target) {
|
||
|
|
qDebug() << "Attempting to create request type:" << type << "for target:" << target;
|
||
|
|
|
||
|
|
if (type == "IMAP") {
|
||
|
|
// Placeholder for IMAP request creation
|
||
|
|
return new ImapRequest(nullptr); // Will be properly initialized by the concrete class
|
||
|
|
} else if (type == "SMTP") {
|
||
|
|
// Placeholder for SMTP request creation
|
||
|
|
return new SmtpRequest(nullptr); // Will be properly initialized by the concrete class
|
||
|
|
}
|
||
|
|
|
||
|
|
qWarning() << "Unknown request type:" << type;
|
||
|
|
return nullptr;
|
||
|
|
}
|