scripting.c

This is an example of the scripting 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 "PM_Plugin.h"
00040 
00041 int PM_PluginInit(int argc, char *argv[], PM_RuntimeInfo *runtimeInfo)
00042 {
00043     //intialize the plug-in
00044     return PM_RESULT_SUCCESS;
00045 }
00046 
00047 int PM_PluginExit(int status, PM_RuntimeInfo *runtimeInfo)
00048 {
00049     //clean up
00050     return PM_RESULT_SUCCESS;
00051 }
00052 
00053 int PM_PostInstall(PM_RuntimeInfo *runtimeInfo, PM_Descriptor* descriptor)
00054 {
00055     if (runtimeInfo->rollback)
00056     {
00057         //error occurred, do clean up
00058     }
00059     else
00060     {
00061         //run script here
00062     }
00063     return PM_RESULT_SUCCESS;
00064 }
00065 
00066 int PM_PostMove(PM_RuntimeInfo *runtimeInfo, PM_Descriptor* descriptor)
00067 {
00068     if (runtimeInfo->rollback)
00069     {
00070         //error occurred, do clean up
00071     }
00072     else
00073     {
00074         //run script here
00075     }
00076     return  PM_RESULT_SUCCESS;
00077 }
00078 
00079 int PM_PostUninstall(PM_RuntimeInfo *runtimeInfo, PM_Descriptor* descriptor)
00080 {
00081     if (runtimeInfo->rollback)
00082     {
00083         //error occurred, do clean up
00084     }
00085     else
00086     {
00087         //run script here
00088     }
00089     return  PM_RESULT_SUCCESS;
00090 }
00091 

Generated on Mon Mar 31 01:01:00 2008 by  doxygen 1.5.4