summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/Teams/CMakeLists.txt6
-rw-r--r--protocols/Teams/Teams.vcxproj51
-rw-r--r--protocols/Teams/Teams.vcxproj.filters34
-rw-r--r--protocols/Teams/res/Resource.rc97
-rw-r--r--protocols/Teams/res/teams.icobin0 -> 1150 bytes
-rw-r--r--protocols/Teams/res/version.rc9
-rw-r--r--protocols/Teams/src/main.cpp43
-rw-r--r--protocols/Teams/src/proto.h19
-rw-r--r--protocols/Teams/src/resource.h16
-rw-r--r--protocols/Teams/src/stdafx.cxx18
-rw-r--r--protocols/Teams/src/stdafx.h50
-rw-r--r--protocols/Teams/src/teams_proto.cpp10
-rw-r--r--protocols/Teams/src/version.h13
13 files changed, 366 insertions, 0 deletions
diff --git a/protocols/Teams/CMakeLists.txt b/protocols/Teams/CMakeLists.txt
new file mode 100644
index 0000000000..32662a7b47
--- /dev/null
+++ b/protocols/Teams/CMakeLists.txt
@@ -0,0 +1,6 @@
+file(GLOB SOURCES "src/*.h" "src/api/*.h" "src/*.cpp" "res/*.rc")
+set(TARGET Teams)
+include(${CMAKE_SOURCE_DIR}/cmake/plugin.cmake)
+target_link_libraries(${TARGET})
+set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS "/std:c++17")
+add_subdirectory(proto_teams) \ No newline at end of file
diff --git a/protocols/Teams/Teams.vcxproj b/protocols/Teams/Teams.vcxproj
new file mode 100644
index 0000000000..83054e7087
--- /dev/null
+++ b/protocols/Teams/Teams.vcxproj
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{DCD56CEC-C61B-4275-A010-8C65C5B48815}</ProjectGuid>
+ <ProjectName>Teams</ProjectName>
+ </PropertyGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(ProjectDir)..\..\build\vc.common\plugin.props" />
+ </ImportGroup>
+ <ItemGroup>
+ <ClCompile Include="src\main.cpp" />
+ <ClCompile Include="src\stdafx.cxx">
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="src\teams_proto.cpp" />
+ <ClInclude Include="src\resource.h" />
+ <ClInclude Include="src\stdafx.h" />
+ <ClInclude Include="src\version.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\Resource.rc" />
+ <ResourceCompile Include="res\version.rc" />
+ </ItemGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <LanguageStandard>stdcpp17</LanguageStandard>
+ <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+</Project> \ No newline at end of file
diff --git a/protocols/Teams/Teams.vcxproj.filters b/protocols/Teams/Teams.vcxproj.filters
new file mode 100644
index 0000000000..8f2a1e1f95
--- /dev/null
+++ b/protocols/Teams/Teams.vcxproj.filters
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="src\main.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\stdafx.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\teams_proto.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="src\resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\stdafx.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\Resource.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="res\version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <Import Project="$(ProjectDir)..\..\build\vc.common\common.filters" />
+</Project> \ No newline at end of file
diff --git a/protocols/Teams/res/Resource.rc b/protocols/Teams/res/Resource.rc
new file mode 100644
index 0000000000..389d09e189
--- /dev/null
+++ b/protocols/Teams/res/Resource.rc
@@ -0,0 +1,97 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "..\src\resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Neutral (Default) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEUD)
+LANGUAGE LANG_NEUTRAL, SUBLANG_DEFAULT
+#pragma code_page(1251)
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "..\\src\\resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // Neutral (Default) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Russian (Russia) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
+LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
+#pragma code_page(1251)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_TEAMS ICON "teams.ico"
+
+#endif // Russian (Russia) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// English (Neutral) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
+#pragma code_page(1252)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+#endif // English (Neutral) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/protocols/Teams/res/teams.ico b/protocols/Teams/res/teams.ico
new file mode 100644
index 0000000000..76e8549214
--- /dev/null
+++ b/protocols/Teams/res/teams.ico
Binary files differ
diff --git a/protocols/Teams/res/version.rc b/protocols/Teams/res/version.rc
new file mode 100644
index 0000000000..5a5ddd63ed
--- /dev/null
+++ b/protocols/Teams/res/version.rc
@@ -0,0 +1,9 @@
+// Microsoft Visual C++ generated resource script.
+//
+#ifdef APSTUDIO_INVOKED
+#error this file is not editable by Microsoft Visual C++
+#endif //APSTUDIO_INVOKED
+
+#include "..\src\version.h"
+
+#include "..\..\build\Version.rc"
diff --git a/protocols/Teams/src/main.cpp b/protocols/Teams/src/main.cpp
new file mode 100644
index 0000000000..5301dc7ecf
--- /dev/null
+++ b/protocols/Teams/src/main.cpp
@@ -0,0 +1,43 @@
+#include "stdafx.h"
+
+CMPlugin g_plugin;
+
+HANDLE hExtraXStatus;
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+PLUGININFOEX pluginInfoEx =
+{
+ sizeof(PLUGININFOEX),
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __COPYRIGHT,
+ __AUTHORWEB,
+ UNICODE_AWARE,
+ // {DCD56CEC-C61B-4275-A010-8C65C5B48815}
+ { 0xDCD56CEC, 0xC61B, 0x4275, { 0xa0, 0x10, 0x8c, 0x65, 0xc5, 0x84, 0x88, 0x15 }}
+};
+
+CMPlugin::CMPlugin() :
+ ACCPROTOPLUGIN<CTeamsProto>("Teams", pluginInfoEx)
+{
+ SetUniqueId("id");
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+static IconItem iconList[] = {
+ { LPGEN("Protocol icon"), "main", IDI_TEAMS },
+};
+
+int CMPlugin::Load()
+{
+ g_plugin.registerIcon("Protocols/" MODULENAME, iconList, MODULENAME);
+ return 0;
+}
diff --git a/protocols/Teams/src/proto.h b/protocols/Teams/src/proto.h
new file mode 100644
index 0000000000..d9001e2402
--- /dev/null
+++ b/protocols/Teams/src/proto.h
@@ -0,0 +1,19 @@
+struct HttpRequest : public MTHttpRequest<CTeamsProto>
+{
+ HttpRequest(int iRequestType, const char *pszUrl);
+};
+
+class CTeamsProto : public PROTO<CTeamsProto>
+{
+public:
+ // constructor
+ CTeamsProto(const char *protoName, const wchar_t *userName);
+ ~CTeamsProto();
+};
+
+struct CMPlugin : public ACCPROTOPLUGIN<CTeamsProto>
+{
+ CMPlugin();
+
+ int Load() override;
+};
diff --git a/protocols/Teams/src/resource.h b/protocols/Teams/src/resource.h
new file mode 100644
index 0000000000..aaf7906399
--- /dev/null
+++ b/protocols/Teams/src/resource.h
@@ -0,0 +1,16 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by W:\miranda-ng\protocols\Steam\res\Resource.rc
+//
+#define IDI_TEAMS 100
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 127
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1087
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/protocols/Teams/src/stdafx.cxx b/protocols/Teams/src/stdafx.cxx
new file mode 100644
index 0000000000..4a1e1f0e70
--- /dev/null
+++ b/protocols/Teams/src/stdafx.cxx
@@ -0,0 +1,18 @@
+/*
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
+
+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 version 2
+of the License.
+
+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" \ No newline at end of file
diff --git a/protocols/Teams/src/stdafx.h b/protocols/Teams/src/stdafx.h
new file mode 100644
index 0000000000..9ef202a899
--- /dev/null
+++ b/protocols/Teams/src/stdafx.h
@@ -0,0 +1,50 @@
+#ifndef _COMMON_H_
+#define _COMMON_H_
+
+#include <windows.h>
+#include <commctrl.h>
+#include <malloc.h>
+#include <time.h>
+
+#include <map>
+#include <regex>
+#include <vector>
+#include <string>
+#include <algorithm>
+
+#include <newpluginapi.h>
+#include <m_chat_int.h>
+#include <m_contacts.h>
+#include <m_database.h>
+#include <m_langpack.h>
+#include <m_message.h>
+#include <m_netlib.h>
+#include <m_options.h>
+#include <m_popup.h>
+#include <m_json.h>
+#include <m_avatars.h>
+#include <m_icolib.h>
+#include <m_skin.h>
+#include <m_clist.h>
+#include <m_genmenu.h>
+#include <m_imgsrvc.h>
+#include <m_protocols.h>
+#include <m_protosvc.h>
+#include <m_protoint.h>
+#include <m_idle.h>
+#include <m_xstatus.h>
+#include <m_extraicons.h>
+#include <m_gui.h>
+#include <m_http.h>
+#include <m_system.h>
+
+#include "resource.h"
+#include "version.h"
+
+#define MODULENAME "Teams"
+
+class CTeamsProto;
+
+#include "proto.h"
+
+#endif //_COMMON_H_ \ No newline at end of file
diff --git a/protocols/Teams/src/teams_proto.cpp b/protocols/Teams/src/teams_proto.cpp
new file mode 100644
index 0000000000..2e6eb83e5c
--- /dev/null
+++ b/protocols/Teams/src/teams_proto.cpp
@@ -0,0 +1,10 @@
+#include "stdafx.h"
+
+CTeamsProto::CTeamsProto(const char *protoName, const wchar_t *userName) :
+ PROTO<CTeamsProto>(protoName, userName)
+{
+}
+
+CTeamsProto::~CTeamsProto()
+{
+}
diff --git a/protocols/Teams/src/version.h b/protocols/Teams/src/version.h
new file mode 100644
index 0000000000..711a86277e
--- /dev/null
+++ b/protocols/Teams/src/version.h
@@ -0,0 +1,13 @@
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 96
+#define __RELEASE_NUM 6
+#define __BUILD_NUM 1
+
+#include <stdver.h>
+
+#define __PLUGIN_NAME "Teams protocol"
+#define __FILENAME "Teams.dll"
+#define __DESCRIPTION "Teams protocol support for Miranda NG."
+#define __AUTHOR "Miranda NG team"
+#define __AUTHORWEB "https://miranda-ng.org/p/Teams"
+#define __COPYRIGHT "© 2025 Miranda NG team"