Skip to content

Commit

Permalink
Added LICENSE and descriptions of source files
Browse files Browse the repository at this point in the history
  • Loading branch information
alok4nand committed Aug 23, 2016
1 parent 9458910 commit 4dc2af3
Show file tree
Hide file tree
Showing 16 changed files with 1,026 additions and 4 deletions.
674 changes: 674 additions & 0 deletions COPYING

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions common.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
/*****************************************************************************
Sets the specifications for Simple Status and Avatar.
This may be useful for multiple connections using
connection manager.
******************************************************************************
* Copyright (C) 2016 Alok Anand
*
* Author: Alok Anand <alok4nand@gmail.com>
*
* Telepathy-bellis free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Telepathy-bellis 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "common.hpp"

Expand Down
22 changes: 22 additions & 0 deletions common.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*****************************************************************************
Header fle for common.cpp
******************************************************************************
* Copyright (C) 2016 Alok Anand
*
* Author: Alok Anand <alok4nand@gmail.com>
*
* Telepathy-bell is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Telepathy-bell 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef BELL_COMMON_HXX
#define BELL_COMMON_HXX

Expand Down
30 changes: 27 additions & 3 deletions connection.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/*****************************************************************************
This models a connection to a single user account.
It also provides capability to request and receive
channels for communcication using Text and Calls.
******************************************************************************
* Copyright (C) 2016 Alok Anand
*
* Author: Alok Anand <alok4nand@gmail.com>
*
* Telepathy-bell is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Telepathy-bell 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include <TelepathyQt/Constants>

#include "connection.hpp"
Expand Down Expand Up @@ -190,8 +214,8 @@ void Connection::onConnected()
void Connection::onIncomingAccountMessage(QString accountID, QString from, MapStringString payload)
{
qDebug() << Q_FUNC_INFO ;

uint handle = ensureHandle("ring:" + from);
QString fromID = "ring:" + from;
uint handle = ensureHandle(fromID);
uint initiatorHandle = handle;
QVariantMap request;
request[TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType")] = TP_QT_IFACE_CHANNEL_TYPE_TEXT;
Expand All @@ -215,7 +239,7 @@ void Connection::onIncomingAccountMessage(QString accountID, QString from, MapSt
qDebug() << "Error, channel is not a RingMessageChannel?";
return;
}
RingMessageChannel->onMessageReceived (accountID, from, payload);
RingMessageChannel->onMessageReceived (accountID, fromID, payload);
}

void Connection::onIncomingCall(QString accountID, QString callID, QString contact)
Expand Down
24 changes: 23 additions & 1 deletion connection.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*****************************************************************************
Header file for connection.cpp
******************************************************************************
* Copyright (C) 2016 Alok Anand
*
* Author: Alok Anand <alok4nand@gmail.com>
*
* Telepathy-bell is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Telepathy-bell 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef BELL_CONNECTION_H
#define BELL_CONNECTION_H

Expand All @@ -8,7 +30,7 @@

#include "parameters.hpp"

/*This models a connection to a single user account.*/


namespace Bell {
class Connection : public Tp::BaseConnection
Expand Down
26 changes: 26 additions & 0 deletions parameters.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
/*****************************************************************************
Deals with all the provided and needed parameters.
If the user has an existing account with RingID,
it fills in the user's AccountID.
The user can also create a new account by entering "ring:"
This class deals with all the above parameter functions and updating them.
******************************************************************************
* Copyright (C) 2016 Alok Anand
*
* Author: Alok Anand <alok4nand@gmail.com>
*
* Telepathy-bell is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Telepathy-bell 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "parameters.hpp"
#include <QDBusMetaType>
#include <QMap>
Expand Down
22 changes: 22 additions & 0 deletions parameters.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*****************************************************************************
Header file for parameters.cpp
******************************************************************************
* Copyright (C) 2016 Alok Anand
*
* Author: Alok Anand <alok4nand@gmail.com>
*
* Telepathy-bell is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Telepathy-bell 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef BELL_PARAMETERS_H
#define BELL_PARAMETERS_H

Expand Down
25 changes: 25 additions & 0 deletions protocol.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
/*****************************************************************************
Creates protocol object for which Connection Manager can create
Connection.
It is also manages the parameters passed on to Connection
object for creating a connection.
******************************************************************************
* Copyright (C) 2016 Alok Anand
*
* Author: Alok Anand <alok4nand@gmail.com>
*
* Telepathy-bell is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Telepathy-bell 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include <TelepathyQt/BaseConnection>
#include <TelepathyQt/Constants>
#include <TelepathyQt/RequestableChannelClassSpec>
Expand Down
22 changes: 22 additions & 0 deletions protocol.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*****************************************************************************
Header file for protocol.cpp
******************************************************************************
* Copyright (C) 2016 Alok Anand
*
* Author: Alok Anand <alok4nand@gmail.com>
*
* Telepathy-bell is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Telepathy-bell 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef BELL_PROTOCOL_H
#define BELL_PROTOCOL_H

Expand Down
24 changes: 24 additions & 0 deletions ringcallchannel.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/*****************************************************************************
A channel used for making audio & video (not implemented) calls.
This manages the incoming and outgoing calls along with its
functions like accept, reject, hold, disconnect.
******************************************************************************
* Copyright (C) 2016 Alok Anand
*
* Author: Alok Anand <alok4nand@gmail.com>
*
* Telepathy-bell is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Telepathy-bell 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "ringcallchannel.hpp"

#include <QtDebug>
Expand Down
22 changes: 22 additions & 0 deletions ringcallchannel.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*****************************************************************************
Header file for ringcallchannel.cpp
******************************************************************************
* Copyright (C) 2016 Alok Anand
*
* Author: Alok Anand <alok4nand@gmail.com>
*
* Telepathy-bell is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Telepathy-bell 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef BELL_RING_CALL_CHANNEL
#define BELL_RING_CALL_CHANNEL

Expand Down
23 changes: 23 additions & 0 deletions ringdaemon.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
/*****************************************************************************
This clss was written for managing ring daemon.
Might be useful in future.
******************************************************************************
* Copyright (C) 2016 Alok Anand
*
* Author: Alok Anand <alok4nand@gmail.com>
*
* Telepathy-bell is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Telepathy-bell 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "ringdaemon.hpp"

using namespace Bell;
Expand Down
22 changes: 22 additions & 0 deletions ringdaemon.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*****************************************************************************
Header file for ringdaemon.cpp
******************************************************************************
* Copyright (C) 2016 Alok Anand
*
* Author: Alok Anand <alok4nand@gmail.com>
*
* Telepathy-bell is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Telepathy-bell 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef BELL_RINGDAEMON_H
#define BELL_RINGDAEMON_H

Expand Down
27 changes: 27 additions & 0 deletions ringmessagechannel.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*****************************************************************************
Channel used for sending and receiving text messages.
******************************************************************************
* Copyright (C) 2016 Alok Anand
*
* Author: Alok Anand <alok4nand@gmail.com>
*
* Telepathy-bell is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Telepathy-bell 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "ringmessagechannel.hpp"
#include "connection.hpp"

Expand Down Expand Up @@ -52,6 +73,12 @@ void RingMessageChannel::onMessageReceived(QString accountID, QString from, MapS
{
qDebug() << iter.key() << iter.value();
}
// processReceivedMessage(payload, mTargetHandle, from);
}

void RingMessageChannel::processReceivedMessage(MapStringString payload, uint senderHandle, const QString &senderID)
{
qDebug() << Q_FUNC_INFO;

}

Expand Down

0 comments on commit 4dc2af3

Please sign in to comment.