Click here to Skip to main content
15,894,825 members
Articles / Mobile Apps / Android

Writing an Android GUI using C++: Part 4 - Activity

Rate me:
Please Sign up or sign in to vote.
4.76/5 (24 votes)
20 Jan 2014CPOL3 min read 102.1K   2.6K   81  
The example given in this article is similar to the previous article, except that it is written with C++.
#ifndef _VSMEMORYDISK
#define _VSMEMORYDISK

#include "vsopenapi.h"

#define VSMEMORYDISKFILE_HEADTAG "VSEXECUTEFILE"

struct StructOfVSMemoryDiskFileHeader{
    //---FileHeader 128Bytes  fixed
    VS_CHAR Tag[16];
    VS_CHAR ServiceName[64];
    VS_UUID  FileHeaderUUID;         //---if does not match with server, need not download
    VS_ULONG UnCompressLength;
    VS_ULONG CompressLength;
    VS_UINT16 SupportOsType;
    VS_UINT8 CoreVersion;   //--0 for randxor   1 for randxor1    
    VS_UINT8 Reserved0[1];
    VS_CHAR ScriptInterface[16];
    VS_UINT8 Reserved[64];
    //VS_CHAR StartFileName[256];       0 is end
};
//Depend Service Name List : ServiceName1,0,DownLoadType1,...,0
//0 is end of Header part
//ex: DownLoadType1 == 0 default download from http://www.srplab.com, ==1 include in the file, ==2 download from current website

//--------------------------------------------------------
//FileHeader
//0 is end
//extend data size
//extend data
//DependFileFullName,UnCompressedSize,CompressedSize,Offset,FileMD5
//0 is end
//ServiceFileFullName,UnCompressedSize,CompressedSize,Offset,FileMD5
//0 is end
//DataFileFullName,UnCompressedSize,CompressedSize,Offset,FileMD5
//0 is end

//file path and name, UnCompressedSize,CompressedSize,FileMD5
//0 is end
//extend data size
//extend data

//file begin,FileStartOffset
//....reserved
//file1 data, -----FileStartOffset
//file2 data, -----FileStartOffset + Offset
//....

#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
China China
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions