diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-13 20:19:46 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-13 20:19:46 +0300 |
commit | 054bb1949247445a29a68812579800904edf6a02 (patch) | |
tree | 6aecd3e738de818d45e703325b17f571baf02ee0 /include | |
parent | 7657cf3cd9f3ae33e29091a947d76234997ebfd9 (diff) |
MS_FILE_* services became useless since StdFile died
Diffstat (limited to 'include')
-rw-r--r-- | include/delphi/m_api.pas | 1 | ||||
-rw-r--r-- | include/delphi/m_file.inc | 85 | ||||
-rw-r--r-- | include/delphi/m_system.inc | 2 | ||||
-rw-r--r-- | include/m_file.h | 44 |
4 files changed, 10 insertions, 122 deletions
diff --git a/include/delphi/m_api.pas b/include/delphi/m_api.pas index 38c0b8afc6..08142e8cc8 100644 --- a/include/delphi/m_api.pas +++ b/include/delphi/m_api.pas @@ -197,7 +197,6 @@ var {$include m_descbutton.inc}
{$include m_email.inc}
{$include m_extraicons.inc}
- {$include m_file.inc}
{$include m_findadd.inc}
{$include m_fontservice.inc}
{$include m_history.inc}
diff --git a/include/delphi/m_file.inc b/include/delphi/m_file.inc deleted file mode 100644 index d1eedc31b1..0000000000 --- a/include/delphi/m_file.inc +++ /dev/null @@ -1,85 +0,0 @@ -{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-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_FILE}
-{$DEFINE M_FILE}
-
-const
- {
- wParam : TMCONTACT
- lParam : 0
- Affects: Brings up the send file dialog for a contact, see notes
- Returns: returns file selection dialog's handle or 0 on error
- Notes : Returns immediately without waiting for the send
- }
- MS_FILE_SENDFILE:PAnsiChar = 'SRFile/SendCommand';
-
- {
- wParam : TMCONTACT
- lParam : pointer to an array of PAnsiChar's the first nil item
- terminates the list -- see notes
- Affects: Brings up the send file dialog with specifieed files already chosen
- the user is not prevented from editing the list
- Returns: returns file selection dialog's handle or 0 on error
- returns immediately without waiting for the send to finish
- Notes : both directories and files can be given
- Version: v0.1.2.1+
- }
- MS_FILE_SENDSPECIFICFILES:PAnsiChar = 'SRFile/SendSpecificFiles';
-
-{
- v0.9.0+
- wParam=(WPARAM)(HANDLE)hContact
- lParam=(LPARAM)(const TCHAR**)ppFiles
- returns file selection dialog's handle or 0 on error
- returns immediately, without waiting for the send
-}
- MS_FILE_SENDSPECIFICFILEST:PAnsiChar = 'SRFile/SendSpecificFilesT';
-
- {
- wParam : TMCONTACT
- lParam : Pointer to a buffer
- Affects: returns the received files folder for a contact, the buffer
- should be at least MAX_PATH long (defined with WinAPI),
- the returned path may not exist -- see notes
- Returns: Returns 0 on success [non zero] on failure
- notes : If TMCONTACT is NULL(0) the path returned is the path
- without the postfix contact name.
- Version: v0.1.2.2+
- }
- MS_FILE_GETRECEIVEDFILESFOLDER:PAnsiChar = 'SRFile/GetReceivedFilesFolder';
-
- {
- wParam : TMCONTACT
- lParam : file selection dialog's window
- Notes : notifies a caller about file send start
- }
- ME_FILEDLG_SUCCEEDED:PAnsiChar = 'SRFile/Dlg/Succeeded';
-
- {
- wParam : TMCONTACT
- lParam : file selection dialog's window
- Notes : notifies a caller about file send cancellation
- }
- ME_FILEDLG_CANCELED:PAnsiChar = 'SRFile/Dlg/Canceled';
-
-{$ENDIF}
diff --git a/include/delphi/m_system.inc b/include/delphi/m_system.inc index a554b25a99..11c8732e45 100644 --- a/include/delphi/m_system.inc +++ b/include/delphi/m_system.inc @@ -76,4 +76,6 @@ const function Miranda_IsTerminated : bytebool; stdcall; external AppDll;
+procedure GetFileReceivedFolder(hContact:TMCONTACT; szFolder:PWideChar); external AppDll;
+
{$ENDIF}
diff --git a/include/m_file.h b/include/m_file.h index 9e616a57d6..abaecd9ece 100644 --- a/include/m_file.h +++ b/include/m_file.h @@ -25,42 +25,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_FILE_H__
#define M_FILE_H__ 1
-// brings up the send file dialog for a contact
-// wParam = (MCONTACT)hContact
-// lParam = 0
-// returns file selection dialog's handle or 0 on error
-// returns immediately, without waiting for the send
-#define MS_FILE_SENDFILE "SRFile/SendCommand"
-
-// brings up the send file dialog with the specified files already chosen
-// returns immediately, without waiting for the send
-// wParam = (MCONTACT)hContact
-// lParam = (LPARAM)(const char**)ppFiles
-// returns file selection dialog's handle or 0 on error
-// returns immediately, without waiting for the send
-// the user is not prevented from changing the filename with the 'choose again' button
-// ppFiles is a NULL-terminated array of fully qualified filenames.
-// To send subdirectories, include their name in the list without a trailing
-// backslash. In order to keep contained files in their correct place on
-// receiving, the subdirectory they're in must preceed the file. This applies
-// to subdirectories themselves too: they must be preceeded by their container
-// if you want to send the container and keep the original directory inside it.
-#define MS_FILE_SENDSPECIFICFILES "SRFile/SendSpecificFiles"
-
-// wParam = (MCONTACT)hContact
-// lParam = (LPARAM)(const wchar_t**)ppFiles
-// returns file selection dialog's handle or 0 on error
-// returns immediately, without waiting for the send
-#define MS_FILE_SENDSPECIFICFILEST "SRFile/SendSpecificFilesT"
-
-// wParam = (MCONTACT)hContact
-// lParam = (LPARAM)(wchar_t *)pszOutput
-// returns 0 on success or nonzero on failure
-// pszOutput must be at least MAX_PATH characters long
-// If hContact is NULL this function will retrieve the received files folder
-// name without any appended user names.
-// Note that the directory name returned by this function does not necessarily exist.
-#define MS_FILE_GETRECEIVEDFILESFOLDER "SRFile/GetReceivedFilesFolder"
+namespace File
+{
+ MIR_APP_DLL(wchar_t *) GetReceivedFolder(MCONTACT hContact, wchar_t *pwszDest, size_t cbDest, bool substVars = true);
+
+ // List of files should be null-terminated
+ MIR_APP_DLL(MWindow) Send(MCONTACT hContact, wchar_t** const ppFiles = nullptr);
+
+};
// notifies a caller about file send start
// wParam = (MCONTACT)hContact
|