From fbcc2024d5adcf4ed4aedc3ee86d7e1ce4e756d5 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Sun, 29 Aug 2010 03:32:07 +0300 Subject: dos2unix --- metacontacts.cpp | 142 +++++++++++++++++++++++++++---------------------------- 1 file changed, 71 insertions(+), 71 deletions(-) (limited to 'metacontacts.cpp') diff --git a/metacontacts.cpp b/metacontacts.cpp index 9ac3d63..6c49411 100644 --- a/metacontacts.cpp +++ b/metacontacts.cpp @@ -1,71 +1,71 @@ -// Copyright © 2010 SecureIM developers (baloo and others), sss -// -// 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. - -#include "commonheaders.h" - -extern bool bMetaContacts; - -BOOL isProtoMetaContacts(HANDLE hContact) -{ - if(bMetaContacts) { - LPSTR proto = (LPSTR)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); - if( proto && strcmp(proto,"MetaContacts")==0 ) { - return true; - } - } - return false; -} - - -BOOL metaIsDefaultSubContact(HANDLE hContact) -{ - - if(bMetaContacts) - return (HANDLE)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0),0)==hContact; - return false; -} - - -HANDLE metaGetContact(HANDLE hContact) -{ - if(bMetaContacts) - return (HANDLE)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0); - return 0; -} - - -HANDLE metaGetMostOnline(HANDLE hContact) -{ - - if(bMetaContacts) - return (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT,(WPARAM)hContact,0); - return 0; -} - -DWORD metaGetContactsNum(HANDLE hContact) -{ - if(bMetaContacts) - return CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, 0); - return 0; -} -HANDLE metaGetSubcontact(HANDLE hContact, int num) -{ - if(bMetaContacts) - return (HANDLE)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, (LPARAM)num); - return 0; -} - - +// Copyright © 2010 SecureIM developers (baloo and others), sss +// +// 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. + +#include "commonheaders.h" + +extern bool bMetaContacts; + +BOOL isProtoMetaContacts(HANDLE hContact) +{ + if(bMetaContacts) { + LPSTR proto = (LPSTR)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); + if( proto && strcmp(proto,"MetaContacts")==0 ) { + return true; + } + } + return false; +} + + +BOOL metaIsDefaultSubContact(HANDLE hContact) +{ + + if(bMetaContacts) + return (HANDLE)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0),0)==hContact; + return false; +} + + +HANDLE metaGetContact(HANDLE hContact) +{ + if(bMetaContacts) + return (HANDLE)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0); + return 0; +} + + +HANDLE metaGetMostOnline(HANDLE hContact) +{ + + if(bMetaContacts) + return (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT,(WPARAM)hContact,0); + return 0; +} + +DWORD metaGetContactsNum(HANDLE hContact) +{ + if(bMetaContacts) + return CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, 0); + return 0; +} +HANDLE metaGetSubcontact(HANDLE hContact, int num) +{ + if(bMetaContacts) + return (HANDLE)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, (LPARAM)num); + return 0; +} + + -- cgit v1.2.3