pstcache.c revision a180a41bba1d50822df23fff0099e90b86638b89
/* -*- c-basic-offset: 8 -*-
rdesktop: A Remote Desktop Protocol client.
Persistent Bitmap Cache routines
Copyright (C) Jeroen Meijer <jeroen@oldambt7.com> 2004-2008
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 <http://www.gnu.org/licenses/>.
*/
#include "rdesktop.h"
extern int g_server_depth;
extern RD_BOOL g_bitmap_cache;
extern RD_BOOL g_bitmap_cache_persist_enable;
extern RD_BOOL g_bitmap_cache_precache;
int g_pstcache_fd[8];
int g_pstcache_Bpp;
void
{
int fd;
return;
}
/* Load a bitmap from the persistent cache */
{
int fd;
return False;
return False;
return True;
}
/* Store a bitmap in the persistent cache */
{
int fd;
return False;
return True;
}
/* List the bitmap keys from the persistent cache file */
int
{
int fd, n;
return 0;
/* The server disconnects if the bitmap cache content is sent more than once */
return 0;
DEBUG_RDP5(("Persistent bitmap cache enumeration... "));
{
break;
{
/* Pre-cache (not possible for 8 bit colour depth cause it needs a colourmap) */
/* Sort by stamp */
{
}
}
else
{
break;
}
}
return idx;
}
/* initialise the persistent bitmap cache */
{
int fd;
char filename[256];
return True;
g_pstcache_fd[cache_id] = 0;
if (!(g_bitmap_cache && g_bitmap_cache_persist_enable))
return False;
if (!rd_pstcache_mkdir())
{
return False;
}
if (fd == -1)
return False;
if (!rd_lock_file(fd, 0, 0))
{
warning("Persistent bitmap caching is disabled. (The file is already in use)\n");
return False;
}
return True;
}