Plugin API
#21 Guest_Toast_*
Posted 11 March 2008 - 05:27 AM
#22
Posted 11 March 2008 - 08:33 AM
#23
Posted 23 March 2008 - 07:06 AM
#24 Guest_Toast_*
Posted 03 April 2008 - 07:55 PM
Vista Gadget API
#25
Posted 04 April 2008 - 10:52 AM
Toast, on Apr 3 2008, 08:55 PM, said:
Vista Gadget API
If it's within the scope of what the Apex plugin API can do then yes it's worth doing, if only as an example plug-in for people wanting to use the API. I don't know if it would be too confusing as an example plug-in due to having to deal with the whole VIsta sidebar API. I'm not a developer, so I guess I don't know what I'm talking about, but we should have a sample plug-in.
#26
Posted 04 April 2008 - 12:42 PM
Toast, on Apr 3 2008, 07:55 PM, said:
Vista Gadget API
Well I haven't looked into it much, but as the gadget api is markup language and jscript only it would need a way to access the plugin to get the information required and after quick look up I see no gadget access to stuff such as SendMessage or FindWindow etc. that would allow direct communication with application components...
#29
Posted 04 September 2010 - 11:57 AM
I like to use ApexDC++, because it's very light, simply and easy to use!
And want to thank all of the developers!
I have a question about plugin API.
I'm trying to write a plugin which send private message to user when he/she start to Upload something from me.
So, I have question: is there something like QUEUE_ADD for HOOK_QUEUE, but for Upload, not Download?
For example:
Bool DCAPI pluginProc(uint32_t eventId, dcptr_t pData) {
switch(eventId) {
/* default actions */
case ON_INSTALL:
case ON_LOAD:
return onLoad(eventId, (DCCorePtr)pData);
case ON_UNINSTALL:
case ON_UNLOAD:
return onUnload(eventId);
case QUEUE_ADD_UPLOAD: /* <-- I need this action to hook! */
BASE_HUB_SEND_PM(dcpp, ((UserDataPtr)pData)->object, "Hello world!", TRUE);
return True;
default: return False;
}
}
Thanks in advance.
#30
Posted 05 September 2010 - 08:25 AM
What would you want it for exactly anyways? And if it is for blocking uploads, that is a) not really something we want to encourage and b) already possible for a plugin to do, although it's a rather roundabout way.
#31
Posted 05 September 2010 - 11:25 AM
Crise, on 05 September 2010 - 08:25 AM, said:
Crise, on 05 September 2010 - 08:25 AM, said:
The basic idea behind all of this: if someone trying to download something from me he / she recieve message about HTTP site where you can find description, screenshots and other infromation related to this files.
Algorithm (what I'm try to achieve):
1) Send message to user when he / she start uploading something.
2) Add user and current datetime to list.
3) If user not in list or time difference between now and datetime from list for current user more than 24 hours - user recieve this message again and list updated with current datetime.
4) Optionally user can send private command and this message won't be shown anymore.
#32
Posted 06 September 2010 - 11:35 AM
Crise, on 05 September 2010 - 08:25 AM, said:
From old source:
BASE_HUB_SEND_PM(dcpp, user->object, result.c_str(), thirdPerson);
From latest (1.3.6):
BASE_HUB_SEND_PM(dcpp, ((UserDataPtr)cmd->object)->object, result.c_str(), thirdPerson)
1) What is structure of UserData->object?
From "PluginDefs.h" - it's just a pointer:
dcptr_t object;
dcptr_t declared as:
typedef void *hookHandle, *dcptr_t, *subsHandle;
2) Can I fill this structure manually and what I need if can?
If there is no API for algorithm from my post above - I can try to get current userlist with WinAPI, but only username and it's hard as hell to use EnumWindows() / SendMessage() to do that...
Any suggestions?
Thanks in advance.
#33
Posted 06 September 2010 - 03:40 PM
In other words they can be thought of as handles of sorts that the underlying implementation uses. The only exception being the object member of CommandData which is (as noted in PluginDefs.h) is either UserData or ClientData.
So to answer your question, to fill f.ex. UserData on your own is impossible.
So right now what you want to do is, while not impossible, extremely hard... because there is no API for querying users (mainly because a user cam go offline at any time yet and the plugin would not know about it).
I am very much aware that there is much room for improvement with the API still but there are number of factors that make making certain additions to the API difficult.
#34
Posted 06 September 2010 - 06:36 PM
Crise, on 06 September 2010 - 03:40 PM, said:
So, I think, there is only one way to do it now: full emulation through WinAPI user's action, like selecting user, "Send private command" and etc.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users













