Main Page | Modules | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

ghost_support.h

Go to the documentation of this file.
00001 #include <alp/bundlemgr.h>
00002 #include <alp/prv/bundlemgr_prv.h>
00003 
00004 extern int ghost_available(void);
00005 extern alp_status_t ghost_start(void);
00006 extern alp_status_t ghost_stop(int now);
00007 
00008 extern int gGHost;
00009 extern void * gGhostSession;
00010 #define GSESSION gGhostSession
00011 
00012 #define ALP_GRAS_QUIT_DELAY_SEC         2
00013 
00014 static inline unsigned int char4_to_int(char * str) {
00015         unsigned int value  = 0;
00016         
00017         value =   ((unsigned int)((unsigned char)str[0])) << 24 |
00018                         ((unsigned int)((unsigned char)str[1])) << 16 |
00019                         ((unsigned int)((unsigned char)str[2])) <<  8 |
00020                         ((unsigned int)((unsigned char)str[3])) <<  0 ;
00021                         
00022         return value;           
00023 }
00024 
00025 static inline const char * int_to_char4(int value, char * buffer) {
00026   if (!buffer) {
00027     static char our_buffer[5];
00028     buffer = our_buffer;
00029   }
00030 
00031   buffer[0] = (unsigned char)(((unsigned int)value) >> 24);
00032   buffer[1] = (unsigned char)(((unsigned int)value) >> 16);
00033   buffer[2] = (unsigned char)(((unsigned int)value) >>  8);
00034   buffer[3] = (unsigned char)(((unsigned int)value) >>  0);
00035   buffer[4] = '\0';
00036                         
00037   return buffer;
00038 }
00039 
00040 

Generated on Sat Dec 16 20:29:47 2006 for hiker-0.9 by  doxygen 1.4.4