/*
Sessions Management plugin for Miranda IM
Copyright (C) 2007-2008 Danil Mozhar
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 3 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, see .
*/
#define _CRT_SECURE_NO_DEPRECATE
#define _WIN32_WINNT 0x0501
#include
#include
#include "resource.h"
#include
#include
#include
#include
#include "..\..\include\m_plugins.h"
#include "..\..\include\newpluginapi.h"
#include "..\..\include\m_utils.h"
#include "..\..\include\m_system.h"
#include "..\..\include\m_options.h"
#include "..\..\include\m_skin.h"
#include "..\..\include\m_clc.h"
#include "..\..\include\m_database.h"
#include "..\..\include\m_langpack.h"
#include "..\..\include\m_icolib.h"
#include "..\..\include\m_message.h"
#include "..\..\include\m_clist.h"
#include "..\..\include\m_protomod.h"
#include "..\..\include\m_clui.h"
#include "..\..\include\m_hotkeys.h"
#include "m_updater.h"
#include "m_messagebox.h"
#include "m_toolbar.h"
#include "m_sessions.h"
#include "utils.h"
extern HANDLE hibChecked;
extern HANDLE hibNotChecked;
//#include "m_skinhotkeys2.h"
#pragma optimize("gsy",on)
#define PLGNAME "Sessions"
#define MIIM_STRING 0x00000040
#define MS_SKIN_ADDHOTKEY "Skin/HotKeys/AddNew"
typedef struct {
int cbSize;
const char *pszName; //name to refer to sound when playing and in db
const char *pszDescription; //description for options dialog
// const char *pszDefaultFile; //default sound file to use
const char *pszSection; //section name used to group sounds (NULL is acceptable)
const char *pszService; //Service to call when HotKey Pressed
int DefHotKey; //default hot key for action
} SKINHOTKEYDESCEX;
int DelUserDefSession(int ses_count);
int DeleteAutoSession(int ses_count);
int LoadSession(WPARAM ,LPARAM );
int SaveSessionHandles(WPARAM ,LPARAM );
int SaveUserSessionHandles(WPARAM ,LPARAM );
int SaveUserSessionName(TCHAR*);
int CloseCurrentSession(WPARAM ,LPARAM );
int SaveSessionDate();
unsigned int ses_limit;
unsigned int g_ses_count;
BOOL g_bExclHidden;
BOOL g_bWarnOnHidden;
BOOL g_bOtherWarnings;
BOOL g_bCrashRecovery;
BOOL g_bIncompletedSave;
extern DWORD session_list_recovered[255];
extern DWORD session_list[255];
#define TIMERID_LOAD 12
#define TIMERID_SHOW 11
#define TIMERID_REBUILDAFTER 14
#define SIZEOF(X)(sizeof(X)/sizeof(X[0]))
#ifdef _UNICODE
#define SESSIONS_NAME "sessions_u"
#else
#define SESSIONS_NAME "sessions_a"
#endif
#define SESSIONS_VERSION_URL "http://miranda.radicaled.ru/public/updater/sessions.txt"
#define SESSIONS_UPDATE_URL "http://miranda.radicaled.ru/public/sessions/"SESSIONS_NAME".zip"
#define SESSIONS_UPDATE_URL "http://miranda.radicaled.ru/public/sessions/"SESSIONS_NAME".zip"
#define SESSIONS_VERSION_PREFIX "Sessions "