diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-29 05:38:03 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-29 05:38:03 +0000 |
commit | af7e438cfe8ce85e1da234318ed1584e89d952cc (patch) | |
tree | 4cdb1379ef8d6c00389aa89cfb27a404ae2aba56 /plugins/ExternalAPI | |
parent | 230623d50baff4e8bf13a8572e0b895bad7b7ed4 (diff) |
only add some plugins and protocols, not adapted
See please maybe not all need us
git-svn-id: http://svn.miranda-ng.org/main/trunk@678 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ExternalAPI')
-rw-r--r-- | plugins/ExternalAPI/m_HTTPServer.h | 12 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_autoreplacer.h | 39 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_avatarhist.h | 56 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_ftpfile.h | 119 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_hddinfo.h | 6 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_mucc.h | 189 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_sendss.h | 66 |
7 files changed, 487 insertions, 0 deletions
diff --git a/plugins/ExternalAPI/m_HTTPServer.h b/plugins/ExternalAPI/m_HTTPServer.h index 6cb6549ee0..c8de071838 100644 --- a/plugins/ExternalAPI/m_HTTPServer.h +++ b/plugins/ExternalAPI/m_HTTPServer.h @@ -100,6 +100,18 @@ typedef struct { #define MS_HTTP_GET_ALL_SHARES "HTTPServer/GetAllShares"
+/////////////////////////////////////////////
+//// Service MS_HTTP_GET_LINK /////
+/////////////////////////////////////////////
+//
+// wParam = (char*)pszSrvPath;
+// lParam = 0
+// Return URL Link on success, 0 on failure
+// Return pointer must be mir_free by caller
+//
+// Return the URL link to the pszSrvPath
+
+#define MS_HTTP_GET_LINK "HTTPServer/GetLink"
#endif
diff --git a/plugins/ExternalAPI/m_autoreplacer.h b/plugins/ExternalAPI/m_autoreplacer.h new file mode 100644 index 0000000000..57271a7163 --- /dev/null +++ b/plugins/ExternalAPI/m_autoreplacer.h @@ -0,0 +1,39 @@ +/*
+ AutoReplacer plugin
+ by Angelo Luiz Tartari
+*/
+
+#ifndef M_AUTOREPLACER_H
+#define M_AUTOREPLACER_H
+
+/*
+ Adds a window handle to AutoReplacer.
+ This handle must belong to any window based on a editbox (editbox, richtext, TMemo, TEdit, TMaskEdit, etc.).
+ After adding a handle, AutoReplacer will automatically work on this window.
+ wParam = 0
+ lParam = (LPARAM)(HWND)hwnd
+ Returns: 0 on success, -1 if hwnd is invalid, 1 on error.
+ Example:
+ if(ServiceExists(MS_AUTOREPLACER_ADDWINHANDLE))
+ autoreplacer_AddWinHandle(GetDlgItem(hwndDlg, IDC_EDIT1));
+*/
+#define MS_AUTOREPLACER_ADDWINHANDLE "AutoReplacer/AddWinHandle"
+static int __inline autoreplacer_AddWinHandle(HWND hwnd) {
+ return (int)CallService(MS_AUTOREPLACER_ADDWINHANDLE, (WPARAM)0, (LPARAM)hwnd);
+}
+
+/*
+ Removes a window handle from AutoReplacer's list.
+ wParam = 0
+ lParam = (LPARAM)(HWND)hwnd
+ Returns: 0 on success, -1 if hwnd is invalid, 1 if hwnd wasn't found.
+ Example:
+ if(ServiceExists(MS_AUTOREPLACER_REMWINHANDLE))
+ autoreplacer_RemWinHandle(GetDlgItem(hwndDlg, IDC_EDIT1));
+*/
+#define MS_AUTOREPLACER_REMWINHANDLE "AutoReplacer/RemWinHandle"
+static int __inline autoreplacer_RemWinHandle(HWND hwnd) {
+ return (int)CallService(MS_AUTOREPLACER_REMWINHANDLE, (WPARAM)0, (LPARAM)hwnd);
+}
+
+#endif
\ No newline at end of file diff --git a/plugins/ExternalAPI/m_avatarhist.h b/plugins/ExternalAPI/m_avatarhist.h new file mode 100644 index 0000000000..6f1e5c8ebd --- /dev/null +++ b/plugins/ExternalAPI/m_avatarhist.h @@ -0,0 +1,56 @@ +/*
+Copyright (C) 2006 MattJ, Ricardo Pescuma Domenecci
+
+This is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This 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
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this file; see the file license.txt. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+*/
+
+
+#ifndef __M_AVATARHISTORY_H__
+# define __M_AVATARHISTORY_H__
+
+
+#define MIID_AVATAR_CHANGE_LOGGER { 0x95e3f3d3, 0x9678, 0x4561, { 0x96, 0xf8, 0x95, 0x88, 0x33, 0x7b, 0x86, 0x68 } }
+#define MIID_AVATAR_CHANGE_NOTIFIER { 0x91af9298, 0x8570, 0x4063, { 0xbf, 0x2f, 0xca, 0x68, 0xd0, 0xe3, 0xb3, 0x6a } }
+
+
+#define EVENTTYPE_AVATAR_CHANGE 9003
+
+
+/*
+Return TRUE is Avatar History is enabled for this contact
+
+wParam: hContact
+lParam: ignored
+*/
+#define MS_AVATARHISTORY_ENABLED "AvatarHistory/IsEnabled"
+
+
+/*
+Get cached avatar
+
+wParam: (char *) protocol name
+lParam: (TCHAR *) hash
+return: (TCHAR *) NULL if none is found or the path to the avatar. You need to free this string
+ with mir_free.
+*/
+#define MS_AVATARHISTORY_GET_CACHED_AVATAR "AvatarHistory/GetCachedAvatar"
+
+
+#define MS_AVATARHISTORY_SHOWDIALOG "AvatarHistory/ShowDialog"
+
+
+
+#endif // __M_AVATARHISTORY_H__
diff --git a/plugins/ExternalAPI/m_ftpfile.h b/plugins/ExternalAPI/m_ftpfile.h new file mode 100644 index 0000000000..6575fd9e3b --- /dev/null +++ b/plugins/ExternalAPI/m_ftpfile.h @@ -0,0 +1,119 @@ +/*
+FTP File YM plugin
+Copyright (C) 2007-2010 Jan Holub
+
+This is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This 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
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this file; see the file license.txt. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+*/
+
+
+#ifndef __M_FTP_FILE_H__
+#define __M_FTP_FILE_H__
+
+#define FNUM_DEFAULT 0 // user's default FTP server
+#define FNUM_FTP1 1 // first FTP server in setting
+#define FNUM_FTP2 2 // second...
+#define FNUM_FTP3 3
+#define FNUM_FTP4 4
+#define FNUM_FTP5 5
+
+#define FMODE_RAWFILE 1 // Object list contains path(s) to file(s) which will be uploaded as they are
+#define FMODE_ZIPFILE 2 // ... path(s) to file(s) which will be zipped and uploaded as one ZIP file
+#define FMODE_ZIPFOLDER 4 // ... path to folder which will be zipped and uploaded as one ZIP file (objectCount == 1)
+
+#define FUPL_UNICODE 1 // Object list contains WCHAR* paths
+
+#if defined _UNICODE || defined UNICODE
+#define FUPL_TCHAR FUPL_UNICODE
+#else
+#define FUPL_TCHAR 0
+#endif
+
+typedef struct
+{
+ int cbSize; // size of the structure
+ HANDLE hContact; // contact handle, can be NULL
+ BYTE ftpNum; // number of the FTP server which will be used for upload, can be one of FNUM_* values
+ BYTE mode; // upload mode, can be one of FMODE_* values
+ DWORD flags; // bitwise OR of the FUPL_* flags above
+
+ union {
+ TCHAR **pstzObjects; // pointer to the array of the object(s) to upload, content is determined by MODE value
+ char **pszObjects;
+ wchar_t **pswzObjects;
+ };
+
+ int objectCount; // number of items in Object list
+} FTPUPLOAD;
+
+//
+// Send file(s) or folder in selected mode to the FTP server
+// wParam = (WPARAM)0; not used
+// lParam = (LPARAM)(FTPUPLOAD*)&ftpu; pointer to FTPUPLOAD
+// returns 0 if upload started with no errors, nonzero otherwise
+//
+#define MS_FTPFILE_UPLOAD "FTPFile/Upload"
+
+__inline static INT_PTR FTPFileUploadA(HANDLE hContact, BYTE ftpNum, BYTE mode, char **pszObjects, int objCount)
+{
+ FTPUPLOAD ftpu = {0};
+ ftpu.cbSize = sizeof(ftpu);
+ ftpu.hContact = hContact;
+ ftpu.ftpNum = ftpNum;
+ ftpu.mode = mode;
+ ftpu.pszObjects = pszObjects;
+ ftpu.objectCount = objCount;
+ return CallService(MS_FTPFILE_UPLOAD, (WPARAM)0, (LPARAM)&ftpu);
+}
+
+__inline static INT_PTR FTPFileUploadW(HANDLE hContact, BYTE ftpNum, BYTE mode, wchar_t **pswzObjects, int objCount)
+{
+ FTPUPLOAD ftpu = {0};
+ ftpu.cbSize = sizeof(ftpu);
+ ftpu.hContact = hContact;
+ ftpu.ftpNum = ftpNum;
+ ftpu.mode = mode;
+ ftpu.flags = FUPL_UNICODE;
+ ftpu.pswzObjects = pswzObjects;
+ ftpu.objectCount = objCount;
+ return CallService(MS_FTPFILE_UPLOAD, (WPARAM)0, (LPARAM)&ftpu);
+}
+
+#if defined _UNICODE || defined UNICODE
+#define FTPFileUpload FTPFileUploadW
+#else
+#define FTPFileUpload FTPFileUploadA
+#endif
+
+//
+// Show a simple file manager
+// wParam = (WPARAM)0; not used
+// lParam = (LPARAM)0; not used
+// returns 0 always
+//
+#define MS_FTPFILE_SHOWMANAGER "FTPFile/ShowManager"
+
+__inline static INT_PTR FTPFileShowManager()
+{
+ return CallService(MS_FTPFILE_SHOWMANAGER, (WPARAM)0, (LPARAM)0);
+}
+
+//
+// OBSOLOTE SERVICE (used by Send Screenshot plugin)
+// Do NOT use it!
+//
+#define MS_FTPFILE_SHAREFILE "FTPFile/ShareFiles"
+
+#endif
\ No newline at end of file diff --git a/plugins/ExternalAPI/m_hddinfo.h b/plugins/ExternalAPI/m_hddinfo.h new file mode 100644 index 0000000000..3f529ec1ff --- /dev/null +++ b/plugins/ExternalAPI/m_hddinfo.h @@ -0,0 +1,6 @@ +#define MS_SYSINFO_HDDTEMP "SysInfo/HddTemp"
+ // checks current hdd temperature
+#define MS_SYSINFO_CUSTPOP "SysInfo/CustomPopup"
+ //shows special custom popup
+#define ME_SYSINFO_HDDOVERHEAT "SysInfo/HddOverheat"
+ // happens if one ot the drives has current temperature higher than set as normal
diff --git a/plugins/ExternalAPI/m_mucc.h b/plugins/ExternalAPI/m_mucc.h new file mode 100644 index 0000000000..44fc7dd2f1 --- /dev/null +++ b/plugins/ExternalAPI/m_mucc.h @@ -0,0 +1,189 @@ +/*
+
+MUCC Group Chat GUI Plugin for Miranda IM
+Copyright (C) 2004 Piotr Piastucki
+
+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, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+#ifndef M_MUCC_INCLUDED
+#define M_MUCC_INCLUDED
+
+#define MUCC_WINDOW_CHATROOM 1
+#define MUCC_WINDOW_CHATLIST 2
+
+#define MUCC_WF_BOLD 0x0001 //enable the 'bold' button
+#define MUCC_WF_ITALIC 0x0002 //enable the 'italics' button
+#define MUCC_WF_UNDERLINE 0x0004 //enable the 'underline' button
+#define MUCC_WF_COLOR 0x0008 //enable the 'foreground color' button
+#define MUCC_WF_BKGCOLOR 0x0010 //enable the 'background color' button
+#define MUCC_WF_TYPNOTIF 0x0020 //enable typing notifications
+
+typedef struct {
+ int cbSize;
+ int iType; //Window type, MUCW_CHATROOM or MUCW_CHATLIST
+ DWORD dwFlags; //Window look & feel flags
+ const char *pszModule; //Identifier of the module owning the window
+ const char *pszModuleName; //Name of the module as displayed to the user
+ const char *pszID; //Unique identifier of the chat room
+ const char *pszName; //Name of the chat room
+ const char *pszUID; //Identifier of the user
+ const char *pszNick; //Nick name used by the user in the chat room
+ const char *pszStatusbarText; //Optional text to set in the statusbar
+} MUCCWINDOW;
+
+#define MS_MUCC_NEW_WINDOW "MUCC/NewWindow"
+
+typedef struct {
+ const char *pszID; //Unique identifier of the group or the chat room
+ const char *pszName; //Name of the group or the chat room
+ const char *pszNick; //Name of the user
+ const char *pszText; //Text, usage depends on type of event
+ int iCount; //Number of users in the chat room
+ DWORD dwFlags; //Item flags
+} MUCCQUERYITEM;
+
+typedef struct {
+ int cbSize;
+ int iType; //Query type, one of MUCC_EVENT_QUERY_* values
+ const char *pszModule; //Name of the module
+ const char *pszParent; //Parent of groups or the group chat rooms belong to
+ int iItemsNum; //Number of items pItems iws pointing to
+ MUCCQUERYITEM *pItems; //Pointer to array of result items
+ DWORD dwFlags; //Item flags
+ int iPage; //Number of page in room list
+ int iLastPage; //1 if the group has any child or there is a next page in room list, 0 otherwise
+} MUCCQUERYRESULT;
+
+#define MS_MUCC_QUERY_RESULT "MUCC/QueryResult"
+
+/*
+ * The following fields must be set for all events:
+ * cbSize - size of the structure
+ * pszModule - module name
+ * iType - event type (id)
+ */
+/*
+ * Incoming messages
+ */
+#define MUCC_EVENT_MESSAGE 0x0001
+/* pszID - room ID
+ * pszUID - user UID (login etc.)
+ * pszNick - user nick (i.e. the name to be displayed)
+ * pszText - message
+ * iFont - font index
+ * iFontSize - font size
+ * color - text color
+ * dwFlags - flags
+ * time - time
+ * bIsMe - TRUE if this is an outgoing message, FALSE otherwise
+ */
+#define MUCC_EVENT_STATUS 0x0002
+/* pszID - room ID
+ * pszUID - user UID (login etc.)
+ * pszNick - user nick (i.e. the name to be displayed)
+ * pszText - unused
+ * dwData - status
+ * dwFlags
+ * bIsMe
+ */
+#define MUCC_EVENT_INVITATION 0x0003
+/*
+*/
+#define MUCC_EVENT_ERROR 0x0004
+
+#define MUCC_EVENT_TOPIC 0x0005
+/* pszID
+ * pszText
+ */
+#define MUCC_EVENT_ROOM_INFO 0x0006
+
+/*
+ * Incoming & outgoing messages
+ */
+#define MUCC_EVENT_JOIN 0x0080
+#define MUCC_EVENT_LEAVE 0x0081
+/*
+ * Outgoing messages
+ */
+#define MUCC_EVENT_INVITE 0x0102
+#define MUCC_EVENT_START_PRIV 0x0103
+#define MUCC_EVENT_REGISTER_NICK 0x0105
+#define MUCC_EVENT_REMOVE_NICK 0x0106
+#define MUCC_EVENT_REGISTER_ROOM 0x0107
+#define MUCC_EVENT_REMOVE_ROOM 0x0108
+#define MUCC_EVENT_KICK_BAN 0x0109
+#define MUCC_EVENT_SET_USER_ROLE 0x010A
+#define MUCC_EVENT_UNBAN 0x010B
+/*
+ * Queries
+ */
+#define MUCC_EVENT_QUERY_GROUPS 0x0120
+#define MUCC_EVENT_QUERY_ROOMS 0x0121
+#define MUCC_EVENT_QUERY_USER_ROOMS 0x0122
+#define MUCC_EVENT_QUERY_USER_NICKS 0x0123
+#define MUCC_EVENT_QUERY_SEARCH 0x0124
+#define MUCC_EVENT_QUERY_CONTACTS 0x0130
+#define MUCC_EVENT_QUERY_USERS 0x0131
+/*
+ Event flags
+*/
+#define MUCC_EF_FONT_BOLD 0x000100 // Bold font flag (MUCC_EVENT_MESSAGE)
+#define MUCC_EF_FONT_ITALIC 0x000200 // Italic font flag (MUCC_EVENT_MESSAGE)
+#define MUCC_EF_FONT_UNDERLINE 0x000400 // Underlined font flags (MUCC_EVENT_MESSAGE)
+/*
+#define MUCC_EF_FONT_NAME 0x000800
+#define MUCC_EF_FONT_SIZE 0x001000
+#define MUCC_EF_FONT_COLOR 0x002000
+*/
+#define MUCC_EF_ROOM_PUBLIC 0x000001
+#define MUCC_EF_ROOM_NICKNAMES 0x000002
+#define MUCC_EF_ROOM_PERMANENT 0x000004
+#define MUCC_EF_ROOM_MEMBERS_ONLY 0x000008
+#define MUCC_EF_ROOM_MODERATED 0x000020
+#define MUCC_EF_ROOM_OFFICIAL 0x000040
+#define MUCC_EF_ROOM_NAME 0x100000
+
+#define MUCC_EF_USER_OWNER 0x000001
+#define MUCC_EF_USER_ADMIN 0x000002
+#define MUCC_EF_USER_REGISTERED 0x000004
+#define MUCC_EF_USER_MEMBER 0x000008
+#define MUCC_EF_USER_MODERATOR 0x000010
+#define MUCC_EF_USER_BANNED 0x000020
+#define MUCC_EF_USER_GLOBALOWNER 0x000040
+
+typedef struct {
+ int cbSize;
+ int iType; // Event type, one of MUCC_EVENT_* values
+ DWORD dwFlags; // Event flags - MUCC_EF_*
+ int iFont; // Text font index
+ int iFontSize; // Text font size
+ COLORREF color; // Text color
+ const char *pszModule; // Name of the module
+ const char *pszID; // Unique identifier of the chat room corresponding to the event,
+ const char *pszName; // Name of the chat room visible to the user
+ const char *pszUID; // User identifier, usage depends on type of event
+ const char *pszNick; // Nick, usage depends on type of event
+ const char *pszText; // Text, usage depends on type of event
+ DWORD dwData; // DWORD data e.g. status
+ BOOL bIsMe; // TRUE if the event is related to the user
+ time_t time; // Time of the event
+} MUCCEVENT;
+
+#define MS_MUCC_EVENT "MUCC/Event"
+#define ME_MUCC_EVENT "MUCC/OutgoingEvent"
+
+#endif
+
diff --git a/plugins/ExternalAPI/m_sendss.h b/plugins/ExternalAPI/m_sendss.h new file mode 100644 index 0000000000..90cc84d421 --- /dev/null +++ b/plugins/ExternalAPI/m_sendss.h @@ -0,0 +1,66 @@ +//This file is part of Send Screenshot a Miranda IM plugin
+//Copyright (c) 2004-2006 Sérgio Vieira Rolanski
+//
+//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, write to the Free Software
+//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+#ifndef _M_SENDSS_H_
+#define _M_SENDSS_H_
+
+//////////////////////////////////////////////////////////////////////////////
+// Open the main capture dialog, but does not capture anything
+// wParam = contact handle
+// lParam = 0
+// Returns zero on success
+// -1 if was not possibly to create capture window
+#define MS_SENDSS_OPENDIALOG "SendSS/OpenCaptureDialog"
+
+//////////////////////////////////////////////////////////////////////////////
+// Send an image to imageshack.us
+// wParam = (char*)filename
+// lParam = (HANDLE)contact (can be null)
+// v0.8.0.0+
+// Returns always 0 (if lParam != 0)
+// Returns (char*)URL or error message if lParam = 0. caller must mir_free the pointer
+#define MS_SENDSS_SEND2IMAGESHACK "SendSS/Send2ImageShack"
+
+//////////////////////////////////////////////////////////////////////////////
+// 1. Send a screenshot of the desktop to the selected contact
+// wParam = contact handle
+// lParam = 0
+// 2. Open the capture dialog in take screenshot only mode (it will not be sent)
+// wParam = 0
+// lParam = anything but 0
+// Returns:
+// zero on success
+// -1 if was not possibly to create capture window
+#define MS_SENDSS_SENDDESKTOP "SendSS/SendDesktop"
+
+//////////////////////////////////////////////////////////////////////////////
+// Edit a in-memory bitmap on the edit window
+// wParam = (SENDSSCB) callback function address to call when editing is done
+// lParam = (HBITMAP) bitmap handle, a copy is made so the calling function can free this handle after the service function returns
+// Returns:
+// Zero on success
+// -1 if could not create the edit window
+// -2 if was not possible to alocate needed memory
+#define MS_SENDSS_EDITBITMAP "SendSS/EditBitmap"
+
+// The parameter passed is the bitmap handle
+// the called function must free this handle when it's not needed anymore
+// Don't do much processing on the called function or you will lock miranda up
+typedef void (__stdcall *SENDSSCB)(LPVOID);
+
+#endif
+
|