/* Copyright (C) 2005 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 __COMMONS_H__ # define __COMMONS_H__ #define _WIN32_WINNT 0x0501 #include #include #include #include #include #define MIRANDA_VER 0x800 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "m_cluiframes.h" #include "m_simpleaway.h" #include #include #include #include "../skins/m_skins_cpp.h" #include "resource.h" #define MODULE_NAME "MyDetails" #define SETTING_FRAME_VISIBLE "FrameVisible" #define SETTING_DEFAULT_NICK "DefaultNick" extern HINSTANCE hInst; extern PLUGINLINK *pluginLink; extern long nickname_dialog_open; extern long status_msg_dialog_open; extern SkinDialog *dialog; #include "m_mydetails.h" #include "data.h" #include "options.h" #include "frame.h" #include "../utils/mir_smileys.h" #include "../utils/mir_memory.h" #include "../utils/mir_options.h" #include "../utils/mir_icons.h" #include "../utils/tstring.h" #define PS_SETMYAVATAR "/SetMyAvatar" #define PS_GETMYAVATAR "/GetMyAvatar" #define PS_GETMYAVATARMAXSIZE "/GetMyAvatarMaxSize" #define PS_GETUNREADEMAILCOUNT "/GetUnreadEmailCount" #define PS_SETMYNICKNAME "/SetNickname" #define PS_GETMYNICKNAMEMAXLENGTH "/GetMyNicknameMaxLength" #define WAYD_UNICODE 1 // return Unicode texts #if defined( _UNICODE ) #define WAYD_TCHAR WAYD_UNICODE #else #define WAYD_TCHAR 0 #endif // Get the max length that a WAYD message can have // wParam=(WPARAM)0 // lParam=(LPARAM)0 // Returns the max length #define PS_GET_MY_WAYD_MAXLENGTH "/GetMyWAYDMaxLength" // Get the WAYD message for the user // wParam=(WPARAM)WAYD_xxx // lParam=(LPARAM)0 // Returns the text or NULL if there is none. Remember to mir_free the return value. #define PS_GET_MY_WAYD "/GetMyWAYD" // Sets the WAYD message for the user // wParam=(WPARAM)WAYD_xxx // lParam=(LPARAM)(WCHAR * or char *)The text to set // Returns 0 on success, nonzero on failure #define PS_SET_MY_WAYD "/SetMyWAYD" #define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]) ) // See if a protocol service exists __inline static int ProtoServiceExists(const char *szModule,const char *szService) { char str[MAXMODULELABELLENGTH]; strcpy(str,szModule); strcat(str,szService); return ServiceExists(str); } #endif // __COMMONS_H__