linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #06475
[Branch ~dcplusplus-team/dcpp-plugin-sdk-cpp/DevPlugin] Rev 14: merge
Merge authors:
poy (poy)
------------------------------------------------------------
revno: 14 [merge]
committer: poy <poy@xxxxxxxxxx>
branch nick: DevPlugin
timestamp: Tue 2013-01-29 19:42:08 +0100
message:
merge
modified:
LICENSE
pluginsdk/Config.cpp
pluginsdk/Config.h
pluginsdk/Connections.cpp
pluginsdk/Connections.h
pluginsdk/Core.cpp
pluginsdk/Core.h
pluginsdk/Hooks.cpp
pluginsdk/Hooks.h
pluginsdk/Hubs.cpp
pluginsdk/Hubs.h
pluginsdk/Logger.cpp
pluginsdk/Logger.h
pluginsdk/PluginDefs.h
pluginsdk/Queue.cpp
pluginsdk/Queue.h
pluginsdk/Tagger.cpp
pluginsdk/Tagger.h
pluginsdk/UI.cpp
pluginsdk/UI.h
pluginsdk/Util.cpp
pluginsdk/Util.h
projects/make/Makefile
src/GUI.cpp
src/GUI.h
src/Plugin.cpp
src/Plugin.h
src/main.cpp
src/resource.rc
src/stdafx.cpp
src/stdafx.h
src/version.h
--
lp:~dcplusplus-team/dcpp-plugin-sdk-cpp/DevPlugin
https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/DevPlugin
Your team Dcplusplus-team is subscribed to branch lp:~dcplusplus-team/dcpp-plugin-sdk-cpp/DevPlugin.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/DevPlugin/+edit-subscription
=== modified file 'LICENSE'
--- LICENSE 2012-11-16 19:19:36 +0000
+++ LICENSE 2013-01-29 18:14:01 +0000
@@ -1,5 +1,5 @@
DC++ plugin SDK (C++)
-Copyright (C) 2012 Jacek Sieka, arnetheduck at gmail dot com
+Copyright (C) 2012-2013 Jacek Sieka, arnetheduck at gmail dot com
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
=== modified file 'pluginsdk/Config.cpp'
--- pluginsdk/Config.cpp 2012-11-15 18:17:16 +0000
+++ pluginsdk/Config.cpp 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/Config.h'
--- pluginsdk/Config.h 2012-11-15 18:17:16 +0000
+++ pluginsdk/Config.h 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/Connections.cpp'
--- pluginsdk/Connections.cpp 2012-11-15 18:17:16 +0000
+++ pluginsdk/Connections.cpp 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/Connections.h'
--- pluginsdk/Connections.h 2012-11-15 18:17:16 +0000
+++ pluginsdk/Connections.h 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/Core.cpp'
--- pluginsdk/Core.cpp 2012-11-15 18:17:16 +0000
+++ pluginsdk/Core.cpp 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/Core.h'
--- pluginsdk/Core.h 2012-11-15 18:17:16 +0000
+++ pluginsdk/Core.h 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/Hooks.cpp'
--- pluginsdk/Hooks.cpp 2012-11-15 18:17:16 +0000
+++ pluginsdk/Hooks.cpp 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/Hooks.h'
--- pluginsdk/Hooks.h 2012-11-15 18:17:16 +0000
+++ pluginsdk/Hooks.h 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/Hubs.cpp'
--- pluginsdk/Hubs.cpp 2012-11-15 18:17:16 +0000
+++ pluginsdk/Hubs.cpp 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/Hubs.h'
--- pluginsdk/Hubs.h 2012-11-15 18:17:16 +0000
+++ pluginsdk/Hubs.h 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/Logger.cpp'
--- pluginsdk/Logger.cpp 2012-11-15 18:17:16 +0000
+++ pluginsdk/Logger.cpp 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/Logger.h'
--- pluginsdk/Logger.h 2012-11-15 18:17:16 +0000
+++ pluginsdk/Logger.h 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/PluginDefs.h'
--- pluginsdk/PluginDefs.h 2012-12-27 21:13:45 +0000
+++ pluginsdk/PluginDefs.h 2013-01-29 18:14:01 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2001-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
@@ -77,7 +77,7 @@
#define DCINTF_DCPP_UTILS_VER 1
#define DCINTF_DCPP_TAGGER "dcpp.xml.DCTagger" /* Manipulation of an XML tagger */
-#define DCINTF_DCPP_TAGGER_VER 1
+#define DCINTF_DCPP_TAGGER_VER 2
#define DCINTF_DCPP_UI "dcpp.ui.DCUI" /* User interface */
#define DCINTF_DCPP_UI_VER 1
@@ -259,7 +259,6 @@
/* Tagging intentions */
typedef struct tagTagData {
- const char* text; /* Plain text string to apply tags on */
dcptr_t object; /* Internal */
Bool isManaged; /* Always True for now */
} TagData, *TagDataPtr;
@@ -426,6 +425,10 @@
uint32_t apiVersion;
void (DCAPI *add_tag) (TagDataPtr hTags, size_t start, size_t end, const char* id, const char* attributes);
+
+ /* Version 2 functions */
+ const char* (DCAPI *get_text) (TagDataPtr hTags);
+ void (DCAPI *replace_text) (TagDataPtr hTags, size_t start, size_t end, const char* replacement);
} DCTagger, *DCTaggerPtr;
/* User interface */
=== modified file 'pluginsdk/Queue.cpp'
--- pluginsdk/Queue.cpp 2012-11-15 18:17:16 +0000
+++ pluginsdk/Queue.cpp 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/Queue.h'
--- pluginsdk/Queue.h 2012-11-15 18:17:16 +0000
+++ pluginsdk/Queue.h 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/Tagger.cpp'
--- pluginsdk/Tagger.cpp 2012-11-15 18:17:16 +0000
+++ pluginsdk/Tagger.cpp 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/Tagger.h'
--- pluginsdk/Tagger.h 2012-11-15 18:17:16 +0000
+++ pluginsdk/Tagger.h 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/UI.cpp'
--- pluginsdk/UI.cpp 2012-11-15 18:17:16 +0000
+++ pluginsdk/UI.cpp 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/UI.h'
--- pluginsdk/UI.h 2012-11-15 18:17:16 +0000
+++ pluginsdk/UI.h 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/Util.cpp'
--- pluginsdk/Util.cpp 2012-11-15 18:17:16 +0000
+++ pluginsdk/Util.cpp 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'pluginsdk/Util.h'
--- pluginsdk/Util.h 2012-11-15 18:17:16 +0000
+++ pluginsdk/Util.h 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'projects/make/Makefile'
--- projects/make/Makefile 2012-12-27 15:38:29 +0000
+++ projects/make/Makefile 2013-01-29 18:42:08 +0000
@@ -25,7 +25,7 @@
pluginsdk/Tagger.o \
pluginsdk/UI.o \
pluginsdk/Util.o \
- src/Dialog.o \
+ src/GUI.o \
src/main.o \
src/Plugin.o \
src/stdafx.o
=== modified file 'src/GUI.cpp'
--- src/GUI.cpp 2012-12-27 15:38:29 +0000
+++ src/GUI.cpp 2013-01-29 18:42:08 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
@@ -23,6 +23,8 @@
#include <pluginsdk/Core.h>
#include <pluginsdk/Util.h>
+#include <memory>
+
#include <boost/lexical_cast.hpp>
#include <dwt/Application.h>
@@ -204,7 +206,13 @@
}
void GUI::write(bool hubOrUser, bool sending, string ip, decltype(ConnectionData().port) port, string peer, string message) {
- Message msg = { hubOrUser, sending, move(ip), port, move(peer), move(message) };
+ auto msg = new Message();
+ msg->hubOrUser = hubOrUser;
+ msg->sending = sending;
+ msg->ip = move(ip);
+ msg->port = port;
+ msg->peer = move(peer);
+ msg->message = move(message);
messages.push(msg);
}
@@ -217,8 +225,9 @@
void GUI::timer() {
int pos = -1;
- Message message;
- while(messages.pop(message)) {
+ std::unique_ptr<Message> messagePtr;
+ while(messages.pop(messagePtr)) {
+ auto& message = *messagePtr.get();
if(!(message.hubOrUser ? hubMessages : userMessages)) {
continue;
=== modified file 'src/GUI.h'
--- src/GUI.h 2012-12-27 13:57:18 +0000
+++ src/GUI.h 2013-01-29 18:42:08 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
@@ -47,7 +47,7 @@
// store the messages to be displayed here; process them with a timer.
struct Message { bool hubOrUser; bool sending; string ip; decltype(ConnectionData().port) port; string peer; string message; };
- boost::lockfree::queue<Message> messages;
+ boost::lockfree::queue<Message*> messages;
uint16_t counter;
bool scroll;
=== modified file 'src/Plugin.cpp'
--- src/Plugin.cpp 2012-12-27 21:14:43 +0000
+++ src/Plugin.cpp 2013-01-29 18:42:08 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'src/Plugin.h'
--- src/Plugin.h 2012-12-27 13:57:18 +0000
+++ src/Plugin.h 2013-01-29 18:42:08 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'src/main.cpp'
--- src/main.cpp 2012-12-27 13:57:18 +0000
+++ src/main.cpp 2013-01-29 18:42:08 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'src/resource.rc'
--- src/resource.rc 2012-12-27 13:57:18 +0000
+++ src/resource.rc 2013-01-29 18:42:08 +0000
@@ -71,7 +71,7 @@
VALUE "FileDescription", "Dev plugin for DC++"
VALUE "FileVersion", "1, 0, 0, 0"
VALUE "InternalName", "DevPlugin"
- VALUE "LegalCopyright", "Copyright (C) 2012 Jacek Sieka"
+ VALUE "LegalCopyright", "Copyright (C) 2012-2013 Jacek Sieka"
VALUE "OriginalFilename", "DevPlugin.dll"
VALUE "ProductName", "Dev plugin for DC++"
VALUE "ProductVersion", "1, 0, 0, 0"
=== modified file 'src/stdafx.cpp'
--- src/stdafx.cpp 2012-11-15 18:17:16 +0000
+++ src/stdafx.cpp 2013-01-18 21:37:14 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'src/stdafx.h'
--- src/stdafx.h 2012-11-15 18:52:40 +0000
+++ src/stdafx.h 2013-01-29 18:42:08 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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
=== modified file 'src/version.h'
--- src/version.h 2012-11-15 18:52:40 +0000
+++ src/version.h 2013-01-29 18:42:08 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Jacek Sieka, arnetheduck on gmail point com
+ * Copyright (C) 2012-2013 Jacek Sieka, arnetheduck on gmail point com
*
* 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