virusscan.cThis is an example of the virus scan code.
00001 /* 00002 * HIGHLY CONFIDENTIAL MATERIALS OF LIMO FOUNDATION AND ITS LICENSORS 00003 * 00004 * Copyright (c) 2006-2007 Motorola, Inc. 00005 * 00006 * Licensed under Foundation Public License (FPL), Version 1.0 or 00007 * later (FPL (Non-Common Capable)). 00008 * FPL V1.0 is attached as Annex B to the Intellectual Property Rights 00009 * Policy, which is Annex A to the Bylaws of LiMo Foundation 00010 * dated April 2, 2007. 00011 * 00012 * This source code software file contains highly confidential and 00013 * proprietary information and is provided only to authorized members 00014 * of the LiMo Foundation and other authorized entities for their use 00015 * as provided by the LiMo Foundation bylaws, annexes, related 00016 * documents and other governing documents. Possession or use by any 00017 * other entity is strictly prohibited. Copies of the governing 00018 * documents may be downloaded at www.limofoundation.org, or obtained 00019 * directly from the LiMo Foundation by sending an e-mail to 00020 * admin@limofoundation.org or by contacting: 00021 * 00022 * LiMo Foundation 00023 * IEEE-ISTO 00024 * 445 Hoes Lane 00025 * Piscataway, NJ 08854-4141 00026 * 00027 * This software file and its contents are provided on an "as is" 00028 * basis without any express or implied warranty, including without 00029 * limitation, any warranty that it is accurate, defect-free, free 00030 * from infringement, contains particular functions or is suitable 00031 * for a particular purpose. All express and implied statutory 00032 * warranties are disclaimed, including without limitation, the 00033 * warranty of merchantability, fitness for a particular purpose, 00034 * title or non-infringement. 00035 * 00036 * NON-COMMON CAPABLE HEADER FILE 10-09-2007 00037 */ 00038 00039 #include <stdio.h> 00040 #include <string.h> 00041 #include "PM_Plugin.h" 00042 00043 int virusScan(const char *tmpDirPath); 00044 00045 int PM_PreInstall(PM_RuntimeInfo *runtimeInfo, PM_Descriptor *descriptor) 00046 { 00047 const char *tmpDirPath = runtimeInfo->tempDirPath; 00048 00049 if (runtimeInfo->rollback) 00050 { 00051 //nothing to do. 00052 } 00053 else 00054 { 00055 if (virusScan(tmpDirPath)) 00056 { 00057 snprintf(runtimeInfo->errorMessage, 00058 PM_MAX_ERROR_SIZE, 00059 "The path: %s can not pass the virus scan", 00060 tmpDirPath); 00061 return PM_RESULT_FAILURE; 00062 } 00063 } 00064 return PM_RESULT_SUCCESS; 00065 } 00066 00067 int virusScan(const char *tmpDirPath) 00068 { 00069 printf("Virus scaning...\n"); 00070 return 0; 00071 } 00072 Generated on Mon Mar 31 01:01:00 2008 by
1.5.4
|