From 788326a35a2f727b711b77e52dd2b79290271f99 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Mon, 10 Aug 2015 15:44:17 +0000 Subject: Yahoo: common project git-svn-id: http://svn.miranda-ng.org/main/trunk@14897 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Yahoo/src/avatar.cpp | 2 +- protocols/Yahoo/src/chat.cpp | 2 +- protocols/Yahoo/src/file_transfer.cpp | 2 +- protocols/Yahoo/src/http_gateway.cpp | 2 +- protocols/Yahoo/src/icolib.cpp | 2 +- protocols/Yahoo/src/ignore.cpp | 2 +- protocols/Yahoo/src/im.cpp | 2 +- protocols/Yahoo/src/links.cpp | 2 +- protocols/Yahoo/src/main.cpp | 2 +- protocols/Yahoo/src/options.cpp | 2 +- protocols/Yahoo/src/proto.cpp | 2 +- protocols/Yahoo/src/search.cpp | 2 +- protocols/Yahoo/src/server.cpp | 2 +- protocols/Yahoo/src/services.cpp | 2 +- protocols/Yahoo/src/stdafx.cpp | 18 ----- protocols/Yahoo/src/stdafx.cxx | 18 +++++ protocols/Yahoo/src/stdafx.h | 136 ++++++++++++++++++++++++++++++++++ protocols/Yahoo/src/user_info.cpp | 2 +- protocols/Yahoo/src/util.cpp | 2 +- protocols/Yahoo/src/webcam.cpp | 2 +- protocols/Yahoo/src/yahoo.cpp | 2 +- protocols/Yahoo/src/yahoo.h | 136 ---------------------------------- 22 files changed, 172 insertions(+), 172 deletions(-) delete mode 100644 protocols/Yahoo/src/stdafx.cpp create mode 100644 protocols/Yahoo/src/stdafx.cxx create mode 100644 protocols/Yahoo/src/stdafx.h delete mode 100644 protocols/Yahoo/src/yahoo.h (limited to 'protocols/Yahoo/src') diff --git a/protocols/Yahoo/src/avatar.cpp b/protocols/Yahoo/src/avatar.cpp index 002764f165..e0ea4d6f15 100644 --- a/protocols/Yahoo/src/avatar.cpp +++ b/protocols/Yahoo/src/avatar.cpp @@ -11,7 +11,7 @@ * and for answering some of my questions during development of this plugin. */ -#include "yahoo.h" +#include "stdafx.h" #include diff --git a/protocols/Yahoo/src/chat.cpp b/protocols/Yahoo/src/chat.cpp index e7a2ba1fe3..906c1f1804 100644 --- a/protocols/Yahoo/src/chat.cpp +++ b/protocols/Yahoo/src/chat.cpp @@ -11,7 +11,7 @@ * and for answering some of my questions during development of this plugin. */ -#include "yahoo.h" +#include "stdafx.h" #include "resource.h" #include #include diff --git a/protocols/Yahoo/src/file_transfer.cpp b/protocols/Yahoo/src/file_transfer.cpp index 91083d9568..649b9ce855 100644 --- a/protocols/Yahoo/src/file_transfer.cpp +++ b/protocols/Yahoo/src/file_transfer.cpp @@ -13,7 +13,7 @@ #include #include -#include "yahoo.h" +#include "stdafx.h" #include #include "file_transfer.h" diff --git a/protocols/Yahoo/src/http_gateway.cpp b/protocols/Yahoo/src/http_gateway.cpp index 5136a26196..bbf5412eae 100644 --- a/protocols/Yahoo/src/http_gateway.cpp +++ b/protocols/Yahoo/src/http_gateway.cpp @@ -11,7 +11,7 @@ * and for answering some of my questions during development of this plugin. */ -#include "yahoo.h" +#include "stdafx.h" #ifdef HTTP_GATEWAY diff --git a/protocols/Yahoo/src/icolib.cpp b/protocols/Yahoo/src/icolib.cpp index 74aca39d1a..f647d3887c 100644 --- a/protocols/Yahoo/src/icolib.cpp +++ b/protocols/Yahoo/src/icolib.cpp @@ -10,7 +10,7 @@ * I want to thank Robert Rainwater and George Hazan for their code and support * and for answering some of my questions during development of this plugin. */ -#include "yahoo.h" +#include "stdafx.h" #include #include #include "m_icolib.h" diff --git a/protocols/Yahoo/src/ignore.cpp b/protocols/Yahoo/src/ignore.cpp index 24f0d96957..88cc7e39f5 100644 --- a/protocols/Yahoo/src/ignore.cpp +++ b/protocols/Yahoo/src/ignore.cpp @@ -10,7 +10,7 @@ * I want to thank Robert Rainwater and George Hazan for their code and support * and for answering some of my questions during development of this plugin. */ -#include "yahoo.h" +#include "stdafx.h" #include "ignore.h" const YList* CYahooProto::GetIgnoreList(void) diff --git a/protocols/Yahoo/src/im.cpp b/protocols/Yahoo/src/im.cpp index db6ead3956..11c6a4de5f 100644 --- a/protocols/Yahoo/src/im.cpp +++ b/protocols/Yahoo/src/im.cpp @@ -11,7 +11,7 @@ * and for answering some of my questions during development of this plugin. */ -#include "yahoo.h" +#include "stdafx.h" #include #include diff --git a/protocols/Yahoo/src/links.cpp b/protocols/Yahoo/src/links.cpp index a436c3f400..c9c6bd76dc 100644 --- a/protocols/Yahoo/src/links.cpp +++ b/protocols/Yahoo/src/links.cpp @@ -11,7 +11,7 @@ * and for answering some of my questions during development of this plugin. */ -#include "yahoo.h" +#include "stdafx.h" #include "m_addcontact.h" #include "m_message.h" diff --git a/protocols/Yahoo/src/main.cpp b/protocols/Yahoo/src/main.cpp index ea336f0fd9..1672312335 100644 --- a/protocols/Yahoo/src/main.cpp +++ b/protocols/Yahoo/src/main.cpp @@ -10,7 +10,7 @@ * I want to thank Robert Rainwater and George Hazan for their code and support * and for answering some of my questions during development of this plugin. */ -#include "yahoo.h" +#include "stdafx.h" #include "http_gateway.h" #include "version.h" #include "resource.h" diff --git a/protocols/Yahoo/src/options.cpp b/protocols/Yahoo/src/options.cpp index 2049e99ec8..ce0a1b613e 100644 --- a/protocols/Yahoo/src/options.cpp +++ b/protocols/Yahoo/src/options.cpp @@ -11,7 +11,7 @@ * and for answering some of my questions during development of this plugin. */ -#include "yahoo.h" +#include "stdafx.h" #include "resource.h" #include diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index ccb3c16257..70ebc1cdcc 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -11,7 +11,7 @@ * and for answering some of my questions during development of this plugin. */ -#include "yahoo.h" +#include "stdafx.h" #include diff --git a/protocols/Yahoo/src/search.cpp b/protocols/Yahoo/src/search.cpp index 0e05230c5c..08feebb998 100644 --- a/protocols/Yahoo/src/search.cpp +++ b/protocols/Yahoo/src/search.cpp @@ -11,7 +11,7 @@ * and for answering some of my questions during development of this plugin. */ -#include "yahoo.h" +#include "stdafx.h" #include #include diff --git a/protocols/Yahoo/src/server.cpp b/protocols/Yahoo/src/server.cpp index 385eed93ba..5c99d2d1b4 100644 --- a/protocols/Yahoo/src/server.cpp +++ b/protocols/Yahoo/src/server.cpp @@ -10,7 +10,7 @@ * I want to thank Robert Rainwater and George Hazan for their code and support * and for answering some of my questions during development of this plugin. */ -#include "yahoo.h" +#include "stdafx.h" #include int PASCAL send(SOCKET s, const char FAR *buf, int len, int flags) diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp index 25e7a2a1e1..d3210ba217 100644 --- a/protocols/Yahoo/src/services.cpp +++ b/protocols/Yahoo/src/services.cpp @@ -11,7 +11,7 @@ * and for answering some of my questions during development of this plugin. */ -#include "yahoo.h" +#include "stdafx.h" #include #include diff --git a/protocols/Yahoo/src/stdafx.cpp b/protocols/Yahoo/src/stdafx.cpp deleted file mode 100644 index da48b93955..0000000000 --- a/protocols/Yahoo/src/stdafx.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright (C) 2012-15 Miranda NG project (http://miranda-ng.org) - -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 version 2 -of the License. - -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, see . -*/ - -#include "yahoo.h" \ No newline at end of file diff --git a/protocols/Yahoo/src/stdafx.cxx b/protocols/Yahoo/src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/protocols/Yahoo/src/stdafx.cxx @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-15 Miranda NG project (http://miranda-ng.org) + +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 version 2 +of the License. + +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, see . +*/ + +#include "stdafx.h" \ No newline at end of file diff --git a/protocols/Yahoo/src/stdafx.h b/protocols/Yahoo/src/stdafx.h new file mode 100644 index 0000000000..1a15b46d58 --- /dev/null +++ b/protocols/Yahoo/src/stdafx.h @@ -0,0 +1,136 @@ +/* + * $Id: yahoo.h 14085 2012-02-13 10:55:56Z george.hazan $ + * + * myYahoo Miranda Plugin + * + * Authors: Gennady Feldman (aka Gena01) + * Laurent Marechal (aka Peorth) + * + * This code is under GPL and is based on AIM, MSN and Miranda source code. + * I want to thank Robert Rainwater and George Hazan for their code and support + * and for answering some of my questions during development of this plugin. + */ +#ifndef _YAHOO_YAHOO_H_ +#define _YAHOO_YAHOO_H_ + +#pragma warning(disable:4302 4311 4312) + +#include +#include + +#include +#include +#include +#include + +/* + * Yahoo Services + */ +#define USE_STRUCT_CALLBACKS + +#include "libyahoo2/yahoo2.h" +#include "libyahoo2/yahoo2_callbacks.h" +#include "libyahoo2/yahoo_util.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================= +// Definitions +//======================================================= +// Build is a cvs build +// +// If defined, the build will add cvs info to the plugin info +#define YAHOO_CVSBUILD + +#define YAHOO_LOGINSERVER "LoginServer" +#define YAHOO_LOGINPORT "LoginPort" +#define YAHOO_LOGINID "yahoo_id" +#define YAHOO_PASSWORD "Password" +#define YAHOO_PWTOKEN "PWToken" +#define YAHOO_CHECKMAIL "CheckMail" +#define YAHOO_CUSTSTATDB "CustomStat" +#define YAHOO_DEFAULT_PORT 5050 +#define YAHOO_DEFAULT_LOGIN_SERVER "mcs.msg.yahoo.com" +#define YAHOO_DEFAULT_JAPAN_LOGIN_SERVER "cs.yahoo.co.jp" +#define YAHOO_CUSTOM_STATUS 99 + +extern int do_yahoo_debug; + +#define LOG(x) if (do_yahoo_debug) { debugLogA("%s:%d: ", __FILE__, __LINE__); \ + debugLogA x; \ + debugLogA(" ");} + +#define YAHOO_SET_CUST_STAT "/SetCustomStatCommand" +#define YAHOO_EDIT_MY_PROFILE "/YahooEditMyProfileCommand" +#define YAHOO_SHOW_PROFILE "/YahooShowProfileCommand" +#define YAHOO_SHOW_MY_PROFILE "/YahooShowMyProfileCommand" +#define YAHOO_YAHOO_MAIL "/YahooGotoMailboxCommand" +#define YAHOO_REFRESH "/YahooRefreshCommand" +#define YAHOO_AB "/YahooAddressBook" +#define YAHOO_CALENDAR "/YahooCalendar" + +#define STYLE_DEFAULTBGCOLOUR RGB(173,206,247) + +struct _conn { + unsigned int tag; + int id; + INT_PTR fd; + yahoo_input_condition cond; + void *data; + int remove; +}; + +#include "proto.h" + +//======================================================= +// Defines +//======================================================= +extern HINSTANCE hInstance; + +#ifdef HTTP_GATEWAY +extern int iHTTPGateway; +#endif + +struct YAHOO_SEARCH_RESULT : public PROTOSEARCHRESULT +{ + yahoo_im_protocols protocol; +}; + +#define YAHOO_hasnotification() ServiceExists(MS_CLIST_SYSTRAY_NOTIFY) + +int YAHOO_util_dbsettingchanged(WPARAM wParam, LPARAM lParam); + +//Services.c +int SetStatus(WPARAM wParam,LPARAM lParam); +int GetStatus(WPARAM wParam,LPARAM lParam); + +yahoo_status miranda_to_yahoo(int myyahooStatus); + +void register_callbacks(); + +#ifdef __GNUC__ + int debugLogA( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2))); +#else + int debugLogA( const char *fmt, ... ); +#endif + +void SetButtonCheck(HWND hwndDlg, int CtrlID, BOOL bCheck); + +char * yahoo_status_code(enum yahoo_status s); +void yahoo_callback(struct _conn *c, yahoo_input_condition cond); + +CYahooProto* __fastcall getProtoById( int id ); +#define GETPROTOBYID(A) CYahooProto* ppro = getProtoById(A); if ( ppro ) ppro + +#endif diff --git a/protocols/Yahoo/src/user_info.cpp b/protocols/Yahoo/src/user_info.cpp index bb96c73132..5c4e573ce0 100644 --- a/protocols/Yahoo/src/user_info.cpp +++ b/protocols/Yahoo/src/user_info.cpp @@ -11,7 +11,7 @@ * and for answering some of my questions during development of this plugin. */ -#include "yahoo.h" +#include "stdafx.h" #include #include diff --git a/protocols/Yahoo/src/util.cpp b/protocols/Yahoo/src/util.cpp index 486fe2a7b1..d1318c182f 100644 --- a/protocols/Yahoo/src/util.cpp +++ b/protocols/Yahoo/src/util.cpp @@ -10,7 +10,7 @@ * I want to thank Robert Rainwater and George Hazan for their code and support * and for answering some of my questions during development of this plugin. */ -#include "yahoo.h" +#include "stdafx.h" #include #include #include diff --git a/protocols/Yahoo/src/webcam.cpp b/protocols/Yahoo/src/webcam.cpp index 8a5c0b01e9..b52bdcff68 100644 --- a/protocols/Yahoo/src/webcam.cpp +++ b/protocols/Yahoo/src/webcam.cpp @@ -18,7 +18,7 @@ /* * Miranda headers */ -#include "yahoo.h" +#include "stdafx.h" #include #include #include diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp index 0a08837a8c..b9ffedfdd9 100644 --- a/protocols/Yahoo/src/yahoo.cpp +++ b/protocols/Yahoo/src/yahoo.cpp @@ -14,7 +14,7 @@ /* * Miranda headers */ -#include "yahoo.h" +#include "stdafx.h" #include #include #include diff --git a/protocols/Yahoo/src/yahoo.h b/protocols/Yahoo/src/yahoo.h deleted file mode 100644 index 1a15b46d58..0000000000 --- a/protocols/Yahoo/src/yahoo.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - * $Id: yahoo.h 14085 2012-02-13 10:55:56Z george.hazan $ - * - * myYahoo Miranda Plugin - * - * Authors: Gennady Feldman (aka Gena01) - * Laurent Marechal (aka Peorth) - * - * This code is under GPL and is based on AIM, MSN and Miranda source code. - * I want to thank Robert Rainwater and George Hazan for their code and support - * and for answering some of my questions during development of this plugin. - */ -#ifndef _YAHOO_YAHOO_H_ -#define _YAHOO_YAHOO_H_ - -#pragma warning(disable:4302 4311 4312) - -#include -#include - -#include -#include -#include -#include - -/* - * Yahoo Services - */ -#define USE_STRUCT_CALLBACKS - -#include "libyahoo2/yahoo2.h" -#include "libyahoo2/yahoo2_callbacks.h" -#include "libyahoo2/yahoo_util.h" - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================= -// Definitions -//======================================================= -// Build is a cvs build -// -// If defined, the build will add cvs info to the plugin info -#define YAHOO_CVSBUILD - -#define YAHOO_LOGINSERVER "LoginServer" -#define YAHOO_LOGINPORT "LoginPort" -#define YAHOO_LOGINID "yahoo_id" -#define YAHOO_PASSWORD "Password" -#define YAHOO_PWTOKEN "PWToken" -#define YAHOO_CHECKMAIL "CheckMail" -#define YAHOO_CUSTSTATDB "CustomStat" -#define YAHOO_DEFAULT_PORT 5050 -#define YAHOO_DEFAULT_LOGIN_SERVER "mcs.msg.yahoo.com" -#define YAHOO_DEFAULT_JAPAN_LOGIN_SERVER "cs.yahoo.co.jp" -#define YAHOO_CUSTOM_STATUS 99 - -extern int do_yahoo_debug; - -#define LOG(x) if (do_yahoo_debug) { debugLogA("%s:%d: ", __FILE__, __LINE__); \ - debugLogA x; \ - debugLogA(" ");} - -#define YAHOO_SET_CUST_STAT "/SetCustomStatCommand" -#define YAHOO_EDIT_MY_PROFILE "/YahooEditMyProfileCommand" -#define YAHOO_SHOW_PROFILE "/YahooShowProfileCommand" -#define YAHOO_SHOW_MY_PROFILE "/YahooShowMyProfileCommand" -#define YAHOO_YAHOO_MAIL "/YahooGotoMailboxCommand" -#define YAHOO_REFRESH "/YahooRefreshCommand" -#define YAHOO_AB "/YahooAddressBook" -#define YAHOO_CALENDAR "/YahooCalendar" - -#define STYLE_DEFAULTBGCOLOUR RGB(173,206,247) - -struct _conn { - unsigned int tag; - int id; - INT_PTR fd; - yahoo_input_condition cond; - void *data; - int remove; -}; - -#include "proto.h" - -//======================================================= -// Defines -//======================================================= -extern HINSTANCE hInstance; - -#ifdef HTTP_GATEWAY -extern int iHTTPGateway; -#endif - -struct YAHOO_SEARCH_RESULT : public PROTOSEARCHRESULT -{ - yahoo_im_protocols protocol; -}; - -#define YAHOO_hasnotification() ServiceExists(MS_CLIST_SYSTRAY_NOTIFY) - -int YAHOO_util_dbsettingchanged(WPARAM wParam, LPARAM lParam); - -//Services.c -int SetStatus(WPARAM wParam,LPARAM lParam); -int GetStatus(WPARAM wParam,LPARAM lParam); - -yahoo_status miranda_to_yahoo(int myyahooStatus); - -void register_callbacks(); - -#ifdef __GNUC__ - int debugLogA( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2))); -#else - int debugLogA( const char *fmt, ... ); -#endif - -void SetButtonCheck(HWND hwndDlg, int CtrlID, BOOL bCheck); - -char * yahoo_status_code(enum yahoo_status s); -void yahoo_callback(struct _conn *c, yahoo_input_condition cond); - -CYahooProto* __fastcall getProtoById( int id ); -#define GETPROTOBYID(A) CYahooProto* ppro = getProtoById(A); if ( ppro ) ppro - -#endif -- cgit v1.2.3