#include <strings.h>
#include <liberipc/eripcbusyd.h>
#include <liberipc/eripccontentlister.h>
Go to the source code of this file.
Defines | |
| #define | CF_ID "CF" |
| #define | SD_ID "SD" |
| #define | USB_ID "USB" |
Functions | |
| static void | usage (void) |
| int | main (int argc, char *argv[]) |
Variables | |
| static erClientChannel_t | contentListerChannel |
Copyright (C) 2005-2008 iRex Technologies B.V. All rights reserved.
Definition in file notify.c.
| #define CF_ID "CF" |
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) |
Definition at line 52 of file notify.c.
00053 { 00054 char device[5] = ""; 00055 int present = 0; 00056 00057 if ( argc != 3 ) 00058 { 00059 usage(); 00060 return 1; 00061 } 00062 00063 // Check 'present' parameter. If not used correctly, make it 0 00064 present = atoi(argv[2]); 00065 if (present != 1) 00066 { 00067 present = 0; 00068 } 00069 00070 if (strcasecmp(CF_ID, argv[1]) == 0) 00071 { 00072 strcpy(device, CF_ID); 00073 } 00074 else if (strcasecmp(SD_ID, argv[1]) == 0) 00075 { 00076 strcpy(device, SD_ID); 00077 } 00078 else if (strcasecmp(USB_ID, argv[1]) == 0) 00079 { 00080 strcpy(device, USB_ID); 00081 } 00082 else 00083 { 00084 usage(); 00085 return 1; 00086 } 00087 00088 #ifdef DEBUG 00089 printf("clNotify: %s is now %s\n", device, (present == 1) ? "present" : "removed"); 00090 #endif 00091 00092 erIpcStartClient(erIpcGetChannel(ER_CONTENT_LISTER_UA_ID), &contentListerChannel); 00093 clStoragePresent(contentListerChannel, device, present); 00094 return 0; 00095 }

| static void usage | ( | void | ) | [static] |
erClientChannel_t contentListerChannel [static] |
1.5.6