summaryrefslogtreecommitdiff
path: root/protocols/Discord/src/proto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Discord/src/proto.cpp')
-rw-r--r--protocols/Discord/src/proto.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp
new file mode 100644
index 0000000000..73651f7b7f
--- /dev/null
+++ b/protocols/Discord/src/proto.cpp
@@ -0,0 +1,41 @@
+/*
+Copyright © 2012-16 Miranda NG team
+Copyright © 2009 Jim Porter
+
+This program 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 2 of the License, or
+(at your option) any later version.
+
+This program 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, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "stdafx.h"
+
+DiscordProto::DiscordProto(const char *proto_name, const wchar_t *username) :
+ PROTO<DiscordProto>(proto_name, username)
+{
+ CreateProtoService(PS_GETNAME, &DiscordProto::GetName);
+ CreateProtoService(PS_GETSTATUS, &DiscordProto::GetStatus);
+}
+
+DiscordProto::~DiscordProto()
+{
+}
+
+INT_PTR DiscordProto::GetName(WPARAM wParam, LPARAM lParam)
+{
+ mir_strncpy((char*)lParam, m_szModuleName, (int)wParam);
+ return 0;
+}
+
+INT_PTR DiscordProto::GetStatus(WPARAM, LPARAM)
+{
+ return m_iStatus;
+}