diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-11 15:43:52 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-11 15:43:52 +0000 |
commit | 683a19c3328e3a13916684de8827651990cf07ed (patch) | |
tree | 2336d3cd5ea080e4e4cc18f8f96f1cced16f6f9c /plugins/ExternalAPI/m_protoplugin.h | |
parent | a9197f5d5921263a042979b0d14fc2c61e411320 (diff) |
minus CreateThread
git-svn-id: http://svn.miranda-ng.org/main/trunk@13544 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ExternalAPI/m_protoplugin.h')
-rw-r--r-- | plugins/ExternalAPI/m_protoplugin.h | 186 |
1 files changed, 93 insertions, 93 deletions
diff --git a/plugins/ExternalAPI/m_protoplugin.h b/plugins/ExternalAPI/m_protoplugin.h index 77c9635625..cbbe8e0ed1 100644 --- a/plugins/ExternalAPI/m_protoplugin.h +++ b/plugins/ExternalAPI/m_protoplugin.h @@ -12,44 +12,44 @@ //structure is used to give parameters to Check, Synchro or Timeout function
struct CheckParam
{
-//Your plugin should use this definition
+ //Your plugin should use this definition
#define YAMN_CHECKVERSION 2
-//Version of this structure. Please verify your version in your plugin
+ //Version of this structure. Please verify your version in your plugin
DWORD Ver;
-//Event that new Check thread must set to signal calling thread that "I've copied all parameters from stack"
-//IMPORTANT!!!: Although version #defined in your plugin is not the same, your plugin MUST signal this event
-//in any way. YAMN is waiting for this event. If you do not signal it, YAMN is blocked.
+ //Event that new Check thread must set to signal calling thread that "I've copied all parameters from stack"
+ //IMPORTANT!!!: Although version #defined in your plugin is not the same, your plugin MUST signal this event
+ //in any way. YAMN is waiting for this event. If you do not signal it, YAMN is blocked.
HANDLE ThreadRunningEV;
-//ActualAccount- the only parameter used in Check function and should contain all needed information I think :)
+ //ActualAccount- the only parameter used in Check function and should contain all needed information I think :)
HACCOUNT AccountParam;
-//I thought it, but this is needed, too
+ //I thought it, but this is needed, too
#define YAMN_NORMALCHECK 0
#define YAMN_FORCECHECK 1
DWORD Flags;
-//YAMN writes here some informations that are needed to pass to mail browser function (or bad connection)
+ //YAMN writes here some informations that are needed to pass to mail browser function (or bad connection)
void *BrowserParam;
-//Calling thread (protocol plugin) can write here its own parameters. Usefull when protocol calls its own check function. YAMN always sets this parameter to NULL
+ //Calling thread (protocol plugin) can write here its own parameters. Usefull when protocol calls its own check function. YAMN always sets this parameter to NULL
void *CustomParam;
};
//structure is used to give parameters to DeleteMails function
struct DeleteParam
{
-//Your plugin should use this definition
+ //Your plugin should use this definition
#define YAMN_DELETEVERSION 1
-//Version of this structure. Please verify your version in your plugin
+ //Version of this structure. Please verify your version in your plugin
DWORD Ver;
-//Event that new Delete thread must set to signal calling thread that it copied all parameters from stack
-//IMPORTANT!!!: Although version #defined in your plugin is not the same, your plugin MUST signal this event
-//in any way. YAMN is waiting for this event. If you do not signal it, YAMN is blocked.
+ //Event that new Delete thread must set to signal calling thread that it copied all parameters from stack
+ //IMPORTANT!!!: Although version #defined in your plugin is not the same, your plugin MUST signal this event
+ //in any way. YAMN is waiting for this event. If you do not signal it, YAMN is blocked.
HANDLE ThreadRunningEV;
-//ActualAccount- which account to delete
+ //ActualAccount- which account to delete
HACCOUNT AccountParam;
-//YAMN writes here some informations that are needed to pass to mail browser function (or bad connection or no new mail)
+ //YAMN writes here some informations that are needed to pass to mail browser function (or bad connection or no new mail)
void *BrowserParam;
-//Calling thread can write here its own parameter. Usefull when protocol calls its own delete function. YAMN always sets this parameter to NULL
+ //Calling thread can write here its own parameter. Usefull when protocol calls its own delete function. YAMN always sets this parameter to NULL
void *CustomParam;
};
@@ -58,123 +58,123 @@ struct DeleteParam //
#ifndef YAMN_STANDARDFCN
-typedef DWORD (WINAPI *YAMN_STANDARDFCN)(LPVOID);
+typedef DWORD(WINAPI *YAMN_STANDARDFCN)(LPVOID);
#endif
typedef struct CYAMNVariables *(WINAPI *YAMN_GETVARIABLESFCN)(DWORD);
-typedef HACCOUNT (WINAPI *YAMN_NEWACCOUNTFCN)(struct CYAMNProtoPlugin *,DWORD);
+typedef HACCOUNT(WINAPI *YAMN_NEWACCOUNTFCN)(struct CYAMNProtoPlugin *, DWORD);
typedef void (WINAPI *YAMN_STOPACCOUNTFCN)(HACCOUNT);
typedef void (WINAPI *YAMN_DELETEACCOUNTFCN)(HACCOUNT);
-typedef DWORD (WINAPI *YAMN_WRITEPLUGINOPTS)(HANDLE File,HACCOUNT);
-typedef DWORD (WINAPI *YAMN_READPLUGINOPTS)(HACCOUNT,char **,char *);
-typedef DWORD (WINAPI *YAMN_CHECKFCN)(struct CheckParam *);
-typedef DWORD (WINAPI *YAMN_DELETEFCN)(struct DeleteParam *);
+typedef DWORD(WINAPI *YAMN_WRITEPLUGINOPTS)(HANDLE File, HACCOUNT);
+typedef DWORD(WINAPI *YAMN_READPLUGINOPTS)(HACCOUNT, char **, char *);
+typedef DWORD(WINAPI *YAMN_CHECKFCN)(struct CheckParam *);
+typedef void(__cdecl *YAMN_DELETEFCN)(void *);
typedef TCHAR* (WINAPI *YAMN_GETERRORSTRINGWFCN)(DWORD);
typedef char* (WINAPI *YAMN_GETERRORSTRINGAFCN)(DWORD);
typedef void (WINAPI *YAMN_DELETEERRORSTRINGFCN)(LPVOID);
-typedef DWORD (WINAPI *YAMN_WRITEACCOUNTSFCN)();
+typedef DWORD(WINAPI *YAMN_WRITEACCOUNTSFCN)();
typedef struct CAccountImportFcn
{
-//If changes are made in this structure, version is changed.
-//So then YAMN does not initialize your structure, if version does not match.
+ //If changes are made in this structure, version is changed.
+ //So then YAMN does not initialize your structure, if version does not match.
#define YAMN_PROTOIMPORTFCNVERSION 3
-//Note: not all of these functions are needed to be implemented in your protocol plugin. Those
-//functions, which are not implemented, you have to set to NULL.
+ //Note: not all of these functions are needed to be implemented in your protocol plugin. Those
+ //functions, which are not implemented, you have to set to NULL.
-//Function is called to construct protocol defined account
-//This is VERY IMPORTANT for YAMN and plugin to cooperate:
-//Imagine following situation. YAMN wants to add new account (it is possible e.g.
-//when loading accounts from file), so it has to call protocol constructor.
-//It calls NewAccount function and plugin creates new account and returns
-//its handle (pointer in fact). That means new account is created with plugin features
-//(it is created inherited account, not base class).
+ //Function is called to construct protocol defined account
+ //This is VERY IMPORTANT for YAMN and plugin to cooperate:
+ //Imagine following situation. YAMN wants to add new account (it is possible e.g.
+ //when loading accounts from file), so it has to call protocol constructor.
+ //It calls NewAccount function and plugin creates new account and returns
+ //its handle (pointer in fact). That means new account is created with plugin features
+ //(it is created inherited account, not base class).
YAMN_NEWACCOUNTFCN NewAccountFcnPtr;
-//Function is called to delete protocol defined variables to inherited CAccount structure
+ //Function is called to delete protocol defined variables to inherited CAccount structure
YAMN_DELETEACCOUNTFCN DeleteAccountFcnPtr;
-//Function is called when user requests not tu run account longer. (E.g. when closing Miranda)
+ //Function is called when user requests not tu run account longer. (E.g. when closing Miranda)
YAMN_STOPACCOUNTFCN StopAccountFcnPtr;
-//Function is called when plugin should write its own info into book file
+ //Function is called when plugin should write its own info into book file
YAMN_WRITEPLUGINOPTS WritePluginOptsFcnPtr;
-//Function is called when plugin should read its own info from book file
+ //Function is called when plugin should read its own info from book file
YAMN_READPLUGINOPTS ReadPluginOptsFcnPtr;
-//Function is called to synchronise account (delete old mails and get the new ones)
+ //Function is called to synchronise account (delete old mails and get the new ones)
YAMN_CHECKFCN SynchroFcnPtr;
-//Function is called when timer timed out- it can be the same as SynchroFcnPtr
+ //Function is called when timer timed out- it can be the same as SynchroFcnPtr
YAMN_CHECKFCN TimeoutFcnPtr;
-//Function is called when forced checking- it can be the same as SynchroFcnPtr
+ //Function is called when forced checking- it can be the same as SynchroFcnPtr
YAMN_CHECKFCN ForceCheckFcnPtr;
-//Function is called when user wants to delete mails
+ //Function is called when user wants to delete mails
YAMN_DELETEFCN DeleteMailsFcnPtr;
-//Function is called when YAMN wants to get error description. Note the parameter given in
-//this function is in fact the same as your CheckFcnPtr, DeleteMailsFcnPtr etc. returns to YAMN.
-//If you want, you may return pointer to some structure, which includes more information about
-//error than only one DWORD. And then, you can in your function create Unicode string containing
-//all your error code. YAMN copies this string into its own buffer. Your error code and pointer
-//can be deleted in DeleteErrorStringFcnPtr, which is called by YAMN
+ //Function is called when YAMN wants to get error description. Note the parameter given in
+ //this function is in fact the same as your CheckFcnPtr, DeleteMailsFcnPtr etc. returns to YAMN.
+ //If you want, you may return pointer to some structure, which includes more information about
+ //error than only one DWORD. And then, you can in your function create Unicode string containing
+ //all your error code. YAMN copies this string into its own buffer. Your error code and pointer
+ //can be deleted in DeleteErrorStringFcnPtr, which is called by YAMN
YAMN_GETERRORSTRINGWFCN GetErrorStringWFcnPtr;
-//This is the same as previous one, but plugin returns normal string (not Unicode). YAMN first
-//looks, if your plugin has implemented GetErrorStringWFcnPtr. If not, it looks for this function
-//So as you (of course) wait, you implemnt only one of these functions or no one of them.
+ //This is the same as previous one, but plugin returns normal string (not Unicode). YAMN first
+ //looks, if your plugin has implemented GetErrorStringWFcnPtr. If not, it looks for this function
+ //So as you (of course) wait, you implemnt only one of these functions or no one of them.
YAMN_GETERRORSTRINGAFCN GetErrorStringAFcnPtr;
-//Deletes error string that was allocated in your GetErrorStringXFcnPtr. Parameter to this fcn is
-//Unicode or normal string. Therefore parameter is defined as LPVOID, but your plugin knows if it is
-//Unicode or not...
-//If NULL, YAMN does nothing with string
+ //Deletes error string that was allocated in your GetErrorStringXFcnPtr. Parameter to this fcn is
+ //Unicode or normal string. Therefore parameter is defined as LPVOID, but your plugin knows if it is
+ //Unicode or not...
+ //If NULL, YAMN does nothing with string
YAMN_DELETEERRORSTRINGFCN DeleteErrorStringFcnPtr;
-//Function is called to notify plugin, that it is quite good to store account status (and mails)
+ //Function is called to notify plugin, that it is quite good to store account status (and mails)
YAMN_WRITEACCOUNTSFCN WriteAccountsFcnPtr;
-//Function is called when user wants to view mails
-//not used now, in the future
+ //Function is called when user wants to view mails
+ //not used now, in the future
YAMN_STANDARDFCN ViewMailsFcnPtr;
-//Function is called when application exits. Plugin should unload
+ //Function is called when application exits. Plugin should unload
YAMN_STANDARDFCN UnLoadFcn;
} YAMN_PROTOIMPORTFCN, *PYAMN_PROTOIMPORTFCN;
-typedef HYAMNMAIL (WINAPI *YAMN_NEWMAILFCN)(HACCOUNT,DWORD);
+typedef HYAMNMAIL(WINAPI *YAMN_NEWMAILFCN)(HACCOUNT, DWORD);
typedef void (WINAPI *YAMN_DELETEMAILFCN)(HYAMNMAIL);
-typedef DWORD (WINAPI *YAMN_WRITEMAILOPTS)(HANDLE File,HYAMNMAIL);
-typedef DWORD (WINAPI *YAMN_READMAILOPTS)(HYAMNMAIL,char **,char *);
+typedef DWORD(WINAPI *YAMN_WRITEMAILOPTS)(HANDLE File, HYAMNMAIL);
+typedef DWORD(WINAPI *YAMN_READMAILOPTS)(HYAMNMAIL, char **, char *);
typedef struct CMailImportFcn
{
-//If changes are made in this structure, version is changed.
-//So then YAMN does not initialize your structure, if version does not match.
+ //If changes are made in this structure, version is changed.
+ //So then YAMN does not initialize your structure, if version does not match.
#define YAMN_MAILIMPORTFCNVERSION 1
-//Note: not all of these functions are needed to be implemented in your protocol plugin. Those
-//functions, which are not implemented, you have to set to NULL.
+ //Note: not all of these functions are needed to be implemented in your protocol plugin. Those
+ //functions, which are not implemented, you have to set to NULL.
-//Function is called to construct protocol defined account
-//This is VERY IMPORTANT for YAMN and plugin to cooperate:
-//Imagine following situation. YAMN wants to add new account (it is possible e.g.
-//when loading accounts from file), so it has to call protocol constructor.
-//It calls NewAccount function and plugin creates new account and returns
-//its handle (pointer in fact). That means new account is created with plugin features
-//(it is created inherited account, not base class).
+ //Function is called to construct protocol defined account
+ //This is VERY IMPORTANT for YAMN and plugin to cooperate:
+ //Imagine following situation. YAMN wants to add new account (it is possible e.g.
+ //when loading accounts from file), so it has to call protocol constructor.
+ //It calls NewAccount function and plugin creates new account and returns
+ //its handle (pointer in fact). That means new account is created with plugin features
+ //(it is created inherited account, not base class).
YAMN_NEWMAILFCN NewMailFcnPtr;
-//Function is called to delete protocol defined variables to inherited CAccount structure
+ //Function is called to delete protocol defined variables to inherited CAccount structure
YAMN_DELETEMAILFCN DeleteMailFcnPtr;
-//Function is called when plugin should write its own info into book file
+ //Function is called when plugin should write its own info into book file
YAMN_WRITEMAILOPTS WriteMailOptsFcnPtr;
-//Function is called when plugin should read its own info from book file
+ //Function is called when plugin should read its own info from book file
YAMN_READMAILOPTS ReadMailOptsFcnPtr;
} YAMN_MAILIMPORTFCN, *PYAMN_MAILIMPORTFCN;
@@ -185,42 +185,42 @@ typedef struct CMailImportFcn typedef struct CProtoPluginRegistration
{
#define YAMN_PROTOREGISTRATIONVERSION 1
-//Name of plugin
-//this member CANNOT be NULL. Just write here description, i.e. "Yahoo Mail 1.2"
+ //Name of plugin
+ //this member CANNOT be NULL. Just write here description, i.e. "Yahoo Mail 1.2"
char *Name;
-//The version of plugin. CANNOT be NULL.
+ //The version of plugin. CANNOT be NULL.
char *Ver;
-//Plugin copyright
-//Write here your copyright if you want (or NULL)
+ //Plugin copyright
+ //Write here your copyright if you want (or NULL)
char *Copyright;
-//Plugin description. Can be NULL.
+ //Plugin description. Can be NULL.
char *Description;
-//Your contact (email). Can be NULL.
+ //Your contact (email). Can be NULL.
char *Email;
-//The web page. Can be NULL.
+ //The web page. Can be NULL.
char *WWW;
} YAMN_PROTOREGISTRATION, *PYAMN_PROTOREGISTRATION;
typedef struct CYAMNProtoPlugin
{
-//Pointer to first protocol plugin account
+ //Pointer to first protocol plugin account
HACCOUNT FirstAccount;
-//We prevent browsing through accounts (chained list) from deleting or adding any account
-//If we want to delete or add, we must have "write" access to AccountBrowserSO
-//Note that accounts can be changed during AccountBrowser is in "read" mode, because we do not add or delete account.
+ //We prevent browsing through accounts (chained list) from deleting or adding any account
+ //If we want to delete or add, we must have "write" access to AccountBrowserSO
+ //Note that accounts can be changed during AccountBrowser is in "read" mode, because we do not add or delete account.
PSWMRG AccountBrowserSO;
-//All needed other info from plugin
+ //All needed other info from plugin
PYAMN_PROTOREGISTRATION PluginInfo;
-//Imported functions
+ //Imported functions
PYAMN_PROTOIMPORTFCN Fcn;
PYAMN_MAILIMPORTFCN MailFcn;
} YAMN_PROTOPLUGIN, *PYAMN_PROTOPLUGIN, *HYAMNPROTOPLUGIN;
@@ -229,7 +229,7 @@ typedef struct CProtoPluginQueue {
HYAMNPROTOPLUGIN Plugin;
struct CProtoPluginQueue *Next;
-} YAMN_PROTOPLUGINQUEUE,*PYAMN_PROTOPLUGINQUEUE;
+} YAMN_PROTOPLUGINQUEUE, *PYAMN_PROTOPLUGINQUEUE;
//
//================================== YAMN SERVICES FOR PROTOCOL PLUGIN ==================================
@@ -331,7 +331,7 @@ typedef struct CProtoPluginQueue //================================== FUNCTIONS DEFINITIONS ========================================
//
-typedef int (WINAPI *YAMN_SETPROTOCOLPLUGINFCNIMPORTFCN)(HYAMNPROTOPLUGIN Plugin,PYAMN_PROTOIMPORTFCN YAMNFcn,DWORD YAMNFcnVer,PYAMN_MAILIMPORTFCN YAMNMailFcn,DWORD YAMNMailFcnVer);
+typedef int (WINAPI *YAMN_SETPROTOCOLPLUGINFCNIMPORTFCN)(HYAMNPROTOPLUGIN Plugin, PYAMN_PROTOIMPORTFCN YAMNFcn, DWORD YAMNFcnVer, PYAMN_MAILIMPORTFCN YAMNMailFcn, DWORD YAMNMailFcnVer);
//
//================================== QUICK FUNCTION CALL DEFINITIONS ========================================
|