forked from KDE/ktp-accounts-kcm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add plugin for haze/sipe protocol support
REVIEWED-BY: David Edmundson BUG: 328037 BUG: 326163
- Loading branch information
1 parent
c19091c
commit 470db02
Showing
11 changed files
with
555 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<service xmlns="http://telepathy.freedesktop.org/wiki/service-profile-v1" | ||
id="sipe-haze" | ||
type="IM" | ||
manager="haze" | ||
protocol="sipe" | ||
icon="im-sipe"> | ||
<name>Office Communicator (via libpurple)</name> | ||
</service> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* This file is part of telepathy-accounts-kcm | ||
* | ||
* Copyright (C) 2013 Maksim Melnikau <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2.1 of the License, or (at your option) any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
#include "haze-sipe-account.h" | ||
|
||
#include "sipe-main-options-widget.h" | ||
#include "sipe-advanced-settings-widget.h" | ||
|
||
HazeSipeAccountUi::HazeSipeAccountUi(QObject *parent) | ||
: AbstractAccountUi(parent) | ||
{ | ||
// Main Options | ||
registerSupportedParameter(QLatin1String("account"), QVariant::String); | ||
registerSupportedParameter(QLatin1String("password"), QVariant::String); | ||
|
||
// Advanced Options | ||
registerSupportedParameter(QLatin1String("login"), QVariant::String); | ||
registerSupportedParameter(QLatin1String("server"), QVariant::String); | ||
registerSupportedParameter(QLatin1String("transport"), QVariant::String); | ||
registerSupportedParameter(QLatin1String("useragent"), QVariant::String); | ||
registerSupportedParameter(QLatin1String("authentication"), QVariant::String); | ||
registerSupportedParameter(QLatin1String("dont-publish"), QVariant::Bool); | ||
registerSupportedParameter(QLatin1String("email-url"), QVariant::String); | ||
registerSupportedParameter(QLatin1String("email"), QVariant::String); | ||
registerSupportedParameter(QLatin1String("email-login"), QVariant::String); | ||
registerSupportedParameter(QLatin1String("email-password"), QVariant::String); | ||
registerSupportedParameter(QLatin1String("groupchat-user"), QVariant::String); | ||
} | ||
|
||
HazeSipeAccountUi::~HazeSipeAccountUi() | ||
{ | ||
} | ||
|
||
AbstractAccountParametersWidget *HazeSipeAccountUi::mainOptionsWidget( | ||
ParameterEditModel *model, | ||
QWidget *parent) const | ||
{ | ||
return new SipeMainOptionsWidget(model, parent); | ||
} | ||
|
||
bool HazeSipeAccountUi::hasAdvancedOptionsWidget() const | ||
{ | ||
return true; | ||
} | ||
|
||
AbstractAccountParametersWidget *HazeSipeAccountUi::advancedOptionsWidget( | ||
ParameterEditModel *model, | ||
QWidget *parent) const | ||
{ | ||
AbstractAccountParametersWidget *sipeAdvancedSettingsWidget = new SipeAdvancedSettingsWidget(model, parent); | ||
return sipeAdvancedSettingsWidget; | ||
} | ||
|
||
#include "haze-sipe-account.moc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* This file is part of telepathy-accounts-kcm | ||
* | ||
* Copyright (C) 2013 Maksim Melnikau <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2.1 of the License, or (at your option) any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
#ifndef KCMTELEPATHYACCOUNTS_PLUGIN_HAZE_SIPE_ACCOUNT_H | ||
#define KCMTELEPATHYACCOUNTS_PLUGIN_HAZE_SIPE_ACCOUNT_H | ||
|
||
#include <KCMTelepathyAccounts/AbstractAccountUi> | ||
|
||
class HazeSipeAccountUi : public AbstractAccountUi | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit HazeSipeAccountUi(QObject *parent = 0); | ||
virtual ~HazeSipeAccountUi(); | ||
|
||
virtual AbstractAccountParametersWidget | ||
*mainOptionsWidget(ParameterEditModel *model, | ||
QWidget *parent = 0) const; | ||
virtual bool hasAdvancedOptionsWidget() const; | ||
virtual AbstractAccountParametersWidget | ||
*advancedOptionsWidget(ParameterEditModel *model, | ||
QWidget *parent = 0) const; | ||
|
||
private: | ||
Q_DISABLE_COPY(HazeSipeAccountUi); | ||
}; | ||
|
||
#endif // header guard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* This file is part of telepathy-accounts-kcm | ||
* | ||
* Copyright (C) 2013 Maksim Melnikau <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2.1 of the License, or (at your option) any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
#include "sipe-advanced-settings-widget.h" | ||
|
||
SipeAdvancedSettingsWidget::SipeAdvancedSettingsWidget(ParameterEditModel *model, | ||
QWidget *parent) | ||
: AbstractAccountParametersWidget(model, parent) | ||
{ | ||
// Set up the UI. | ||
m_ui = new Ui::SipeAdvancedSettingsWidget; | ||
m_ui->setupUi(this); | ||
|
||
//server | ||
handleParameter(QLatin1String("login"), QVariant::String, m_ui->loginLineEdit, m_ui->loginLabel); | ||
handleParameter(QLatin1String("server"), QVariant::String, m_ui->serverLineEdit, m_ui->serverLabel); | ||
handleParameter(QLatin1String("transport"), QVariant::String, m_ui->transportLineEdit, m_ui->transportLabel); | ||
handleParameter(QLatin1String("useragent"), QVariant::String, m_ui->useragentLineEdit, m_ui->useragentLabel); | ||
handleParameter(QLatin1String("authentication"), QVariant::String, m_ui->authenticationLineEdit, m_ui->authenticationLabel); | ||
handleParameter(QLatin1String("dont-publish"), QVariant::Bool, m_ui->dontpublishCheckBox, 0); | ||
handleParameter(QLatin1String("email-url"), QVariant::String, m_ui->emailurlLineEdit, m_ui->emailurlLabel); | ||
handleParameter(QLatin1String("email"), QVariant::String, m_ui->emailLineEdit, m_ui->emailLabel); | ||
handleParameter(QLatin1String("email-login"), QVariant::String, m_ui->emailloginLineEdit, m_ui->emailloginLabel); | ||
handleParameter(QLatin1String("email-password"), QVariant::String, m_ui->emailpasswordLineEdit, m_ui->emailpasswordLabel); | ||
handleParameter(QLatin1String("groupchat-user"), QVariant::String, m_ui->groupchatuserLineEdit, m_ui->groupchatuserLabel); | ||
} | ||
|
||
SipeAdvancedSettingsWidget::~SipeAdvancedSettingsWidget() | ||
{ | ||
delete m_ui; | ||
} | ||
|
||
#include "sipe-advanced-settings-widget.moc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* This file is part of telepathy-accounts-kcm | ||
* | ||
* Copyright (C) 2013 Maksim Melnikau <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2.1 of the License, or (at your option) any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
#ifndef KCMTELEPATHYACCOUNTS_PLUGIN_HAZE_SIPE_SERVER_SETTINGS_WIDGET_H | ||
#define KCMTELEPATHYACCOUNTS_PLUGIN_HAZE_SIPE_SERVER_SETTINGS_WIDGET_H | ||
|
||
#include "ui_sipe-advanced-settings-widget.h" | ||
|
||
#include <KCMTelepathyAccounts/AbstractAccountParametersWidget> | ||
|
||
class SipeAdvancedSettingsWidget : public AbstractAccountParametersWidget | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit SipeAdvancedSettingsWidget(ParameterEditModel *model, QWidget *parent = 0); | ||
virtual ~SipeAdvancedSettingsWidget(); | ||
|
||
private: | ||
Q_DISABLE_COPY(SipeAdvancedSettingsWidget); | ||
Ui::SipeAdvancedSettingsWidget *m_ui; | ||
}; | ||
|
||
|
||
#endif // header guard |
Oops, something went wrong.