This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | CamFile |
| struct | t_camera |
| struct | t_date |
| struct | t_mode |
Defines | |
| #define | NORMAL_MODE 1 |
| #define | PRTCMD_MODE 2 |
| #define | TSTDAT_MODE 3 |
| #define | DATE 1 |
| #define | ASCII 2 |
| #define | MAX_ITEMS 200 |
| #define | PREVIEW_DIR "preview" |
| #define | FULLSIZE_DIR "fullsize" |
| #define | SUCCESS 0 |
| #define | FAIL 1 |
| #define | MUST_USE_A_PICTURE_NUMBER 1 |
| #define | MUST_NOT_USE_A_PICTURE_NUMBER 2 |
| #define | MAX_DS_STRLEN 1000 |
| #define | MAX_PICS 1000 |
| #define | ACK 0x06 |
| #define | HP_VENDOR_ID 0x3f0 |
| #define | HP215_ID 0x6202 |
| #define | HP_CMD_INIT {0x02, 0xce, 0x80, 0x8a, 0x84, 0x8d, 0x83, 0x03} |
| #define | HP_CMD_DATETIME {0x02, 0xc1, 0x80, 0x8b, 0x84, 0x8e, 0x8d, 0x03} |
| #define | HP_CMD_GET_PHOTO_ALBUM {0x02, 0xc6, 0x88, 0x80, 0x80, 0x83, 0x84, 0x38, 0x2f, 0x30, 0x32, 0x88, 0x84, 0x8e, 0x8b, 0x03} |
| #define | HP_CMD_DELETE_PICS {0x02, 0xb1, 0x84, 0x8f, 0x8f, 0x8f, 0x8f, 0x86, 0x80, 0x8a, 0x86, 0x03} |
Enumerations | |
| enum | myCodes { N_02, N_03, N_02_PLUS1, N_03_PLUS1, SUM_PICS_02, SUM_PICS_03, D_02, M_LONG, M_SHORT, M_02, M_, Y_02, Y_04, H_02_12, H_02_24, H____12, H____24, H_AMPM, K_02 } |
Functions | |
| void | dprint (char *) |
| This function prints debug information. | |
| usb_device * | find_device (int, int) |
| Searches for the usb device. | |
| int | hp_open (t_camera *, int) |
| Open the camera. | |
| int | hp_init_sequence (t_camera *) |
| Generate a init sequence. | |
| int | hp_new_file (CamFile **) |
| Space for a new file. | |
| int | hp_append_file (CamFile *, const unsigned char *, unsigned long int) |
| Append filedata. | |
| int | hp_sent_ack (t_camera *, int) |
| int | hp_rcv_ack (t_camera *, int) |
| Reading a ACK. | |
| int | hp_gen_cmd (int, int, unsigned char *) |
| Generate a camera commando. | |
| int | hp_get_timeDate_cam (t_camera *) |
| Get date and time. | |
| int | hp_get_photo_album (t_camera *) |
| Get the number of pictures. | |
| int | hp_get_timeDate_pics (t_camera *, int, int[MAX_PICS], char *, char *, int, int) |
| Get picture time/date. | |
| int | hp_get_previews (t_camera *, int, int[MAX_PICS], char *) |
| Get previews. | |
| int | hp_write_previews (t_camera *, int, int[MAX_PICS]) |
| Write previews. | |
| int | hp_get_write_pics (t_camera *, int, int[MAX_PICS], char *) |
| Write picture. | |
| int | hp_delete_pics (t_camera *, int, int, int[MAX_PICS]) |
| Delete pictures. | |
| int | hp_delete_all_pics (t_camera *) |
| Delete pictures. | |
| int | hp_delete_some_pics (t_camera *, int, int[MAX_PICS]) |
| Delete pictures. | |
| void | hp_create_html_page (t_camera *, int, int[MAX_PICS], char *, int, int, int) |
| Write picture. | |
| int | hp_close (t_camera *) |
| void | read_ini (t_mode *mode) |
| Read the commandline. | |
| void | read_cmd (int *, char ***, t_mode *) |
| Read the commandline. | |
| void | usage (void) |
| Prints programm usage. | |
| void | gen_subDirName (char[100]) |
| Generate sub dir name. | |
| void | gen_subDir (char[100]) |
| Generate sub directory. | |
| void | read_number (int *, int[1000], char *) |
| void | getDateStr (char *, unsigned int, unsigned int, t_date, char *, int) |
| Generate datetime string. | |
| void | test_dateString (char *) |
| Test datetime string. | |
| void | check_dateStr (char *) |
| Check the date string. | |
| void | test_cmd (t_mode) |
| Prints programm usage. | |
| void | ini_getNoElements (int *, char *) |
| Get the number of elements on the string. | |
| void | ini_delComment (char *) |
| Delete comments. | |
| void | acceptOptions (t_mode *, int *, char **[], int) |
| Read the commandline. | |
| void | init_modeValues (t_mode *) |
| Init mode values. | |
| void | checkPid (void) |
| Checks if the program is already running. | |
| void | myExit (int, int) |
| void | removeLockFile (void) |
| Deletes the lock file. | |
| void | add_dateInsidePicture (char *dateInPicStr, int picNumbers, int picNumber[MAX_PICS], t_camera *myCam) |
| Adds date/time string in the picture. | |
|
|
Definition at line 75 of file hp215.h. Referenced by hp_rcv_ack(), and hp_send_ack(). |
|
|
Definition at line 52 of file hp215.h. Referenced by getDateStr(). |
|
|
Definition at line 51 of file hp215.h. Referenced by getDateStr(). |
|
|
Definition at line 62 of file hp215.h. Referenced by hp_delete_all_pics(), hp_delete_some_pics(), hp_gen_cmd(), hp_get_photo_album(), hp_get_previews(), hp_get_timeDate_cam(), hp_get_timeDate_pics(), hp_get_write_pics(), hp_init_sequence(), hp_new_file(), hp_open(), hp_rcv_ack(), hp_send_ack(), and hp_write_previews(). |
|
|
Definition at line 58 of file hp215.h. Referenced by hp_get_timeDate_pics(), and main(). |
|
|
Definition at line 78 of file hp215.h. Referenced by hp_open(). |
|
|
Definition at line 82 of file hp215.h. Referenced by hp_get_timeDate_cam(). |
|
|
Definition at line 84 of file hp215.h. Referenced by hp_delete_all_pics(). |
|
|
Definition at line 83 of file hp215.h. Referenced by hp_get_photo_album(). |
|
|
Definition at line 81 of file hp215.h. Referenced by hp_init_sequence(). |
|
|
Definition at line 77 of file hp215.h. Referenced by hp_open(). |
|
|
Definition at line 69 of file hp215.h. Referenced by acceptOptions(), add_dateInsidePicture(), check_dateStr(), getDateStr(), hp_get_timeDate_pics(), and test_dateString(). |
|
|
Definition at line 54 of file hp215.h. Referenced by getDateStr(). |
|
|
|
|
|
Definition at line 66 of file hp215.h. Referenced by add_dateInsidePicture(), check_dateStr(), and test_dateString(). |
|
|
Definition at line 65 of file hp215.h. Referenced by getDateStr(), and hp_get_timeDate_pics(). |
|
|
Definition at line 46 of file hp215.h. Referenced by acceptOptions(). |
|
|
Definition at line 57 of file hp215.h. Referenced by hp_get_timeDate_pics(), and main(). |
|
|
Definition at line 47 of file hp215.h. Referenced by acceptOptions(), and main(). |
|
|
Definition at line 61 of file hp215.h. Referenced by hp_append_file(), hp_delete_all_pics(), hp_delete_pics(), hp_delete_some_pics(), hp_gen_cmd(), hp_get_photo_album(), hp_get_previews(), hp_get_timeDate_cam(), hp_get_timeDate_pics(), hp_get_write_pics(), hp_init_sequence(), hp_new_file(), hp_open(), hp_rcv_ack(), hp_send_ack(), hp_write_previews(), and test_cmd(). |
|
|
Definition at line 48 of file hp215.h. Referenced by acceptOptions(), and main(). |
|
|
|
|
||||||||||||||||||||
|
Definition at line 2217 of file hp215.c. References _, t_mode::albm, t_mode::dateCam, t_mode::dateInPic, t_mode::dateInPicStr, t_mode::datePics, t_mode::dateStr, DEBUG, DEBUG_HEXDUMP, t_mode::delt, t_mode::forceDeletion, t_mode::html, t_mode::main, MAX_DS_STRLEN, myExit(), NORMAL_MODE, t_mode::picNumber, t_mode::picNumberRH, t_mode::picNumberRL, t_mode::picNumberRR, t_mode::picNumbers, t_mode::picNumbersRH, t_mode::picNumbersRL, t_mode::picNumbersRR, t_mode::pics, t_mode::prev, t_mode::printCmd_cmd, t_mode::printCmd_picNo, PRTCMD_MODE, read_number(), t_mode::subDirFull, t_mode::subDirPrev, TIMEOUT, t_mode::tmp_html, t_mode::tryInitCamTwice, TSTDAT_MODE, and usage(). Referenced by read_cmd(), and read_ini(). |
|
||||||||||||||||||||
|
Definition at line 4088 of file hp215.c. References _, DEBUG, getDateStr(), MAX_DS_STRLEN, MUST_NOT_USE_A_PICTURE_NUMBER, CamFile::name, and t_camera::pic. Referenced by main(). |
|
|
This function checks the values of the given date string by using the function "getDateStr". Definition at line 3676 of file hp215.c. References t_date::day, getDateStr(), t_date::hour, MAX_DS_STRLEN, t_date::min, t_date::month, MUST_NOT_USE_A_PICTURE_NUMBER, t_date::sec, and t_date::year. Referenced by main(). |
|
|
This function checks if the programm is already running. If yes it will abboard. If not it will continue. Definition at line 3739 of file hp215.c. References _, DEBUG, dprint(), and removeLockFile(). Referenced by main(). |
|
|
Definition at line 152 of file hp215.c. References DEBUG. Referenced by checkPid(), hp_delete_all_pics(), hp_delete_some_pics(), hp_get_photo_album(), hp_get_previews(), hp_get_timeDate_cam(), hp_get_timeDate_pics(), hp_get_write_pics(), hp_init_sequence(), hp_open(), hp_rcv_ack(), hp_send_ack(), and removeLockFile(). |
|
||||||||||||
|
Definition at line 548 of file hp215.c. References find_device(). Referenced by find_device(), and hp_open(). |
|
|
Definition at line 2740 of file hp215.c. Referenced by main(). |
|
|
Definition at line 2709 of file hp215.c. References monNameShort. Referenced by main(). |
|
||||||||||||||||||||||||||||
|
Hier is an overview of all codes:
|
|
||||||||||||||||
|
Definition at line 421 of file hp215.c. References _, CamFile::data, myExit(), CamFile::size, and SUCCESS. Referenced by hp_get_previews(). |
|
|
|
|
||||||||||||||||||||||||||||||||
|
Definition at line 1563 of file hp215.c. References _, monNameLong, myExit(), CamFile::name_nsd, t_camera::pic, and CamFile::preview_name_nsd. Referenced by main(). |
|
|
Definition at line 1483 of file hp215.c. References _, t_camera::dh, dprint(), FAIL, HP_CMD_DELETE_PICS, hp_get_photo_album(), hp_rcv_ack(), hp_send_ack(), t_camera::num_pics, SUCCESS, and TIMEOUT. Referenced by hp_delete_pics(). |
|
||||||||||||||||||||
|
Definition at line 1364 of file hp215.c. References hp_delete_all_pics(), hp_delete_some_pics(), and SUCCESS. Referenced by main(). |
|
||||||||||||||||
|
Definition at line 1396 of file hp215.c. References _, t_camera::dh, dprint(), FAIL, hex_dump(), hp_gen_cmd(), hp_get_photo_album(), hp_rcv_ack(), hp_send_ack(), t_camera::num_pics, SUCCESS, and TIMEOUT. Referenced by hp_delete_pics(). |
|
||||||||||||||||
|
Thanks to Roberto Ragusa for figuring out the algorithm for this. I would have never figured it out..
|
|
|
|
|
||||||||||||||||||||
|
Definition at line 1024 of file hp215.c. References _, DEBUG, t_camera::dh, dprint(), FAIL, hex_dump(), hp_append_file(), hp_gen_cmd(), hp_rcv_ack(), hp_send_ack(), t_camera::pic, SUCCESS, and TIMEOUT. Referenced by main(). |
|
|
Definition at line 811 of file hp215.c. References _, t_date::day, t_camera::dh, dprint(), FAIL, hex_dump(), t_date::hour, HP_CMD_DATETIME, hp_rcv_ack(), hp_send_ack(), t_date::min, monNameShort, t_date::month, SUCCESS, TIMEOUT, and t_date::year. Referenced by main(). |
|
||||||||||||||||||||||||||||||||
|
Definition at line 2783 of file hp215.c. References _, DEBUG, t_camera::dh, dprint(), FAIL, FULLSIZE_DIR, getDateStr(), hex_dump(), hp_gen_cmd(), hp_new_file(), hp_rcv_ack(), hp_send_ack(), MAX_DS_STRLEN, monNameShort, MUST_USE_A_PICTURE_NUMBER, t_camera::pic, PREVIEW_DIR, SUCCESS, and TIMEOUT. Referenced by main(). |
|
||||||||||||||||||||
|
Definition at line 1225 of file hp215.c. References _, CamFile::date_time, t_camera::dh, dprint(), FAIL, hp_gen_cmd(), hp_rcv_ack(), hp_send_ack(), myExit(), CamFile::name, t_camera::pic, SUCCESS, and TIMEOUT. Referenced by main(). |
|
|
|
|
|
Definition at line 386 of file hp215.c. References _, FAIL, and SUCCESS. Referenced by hp_get_timeDate_pics(). |
|
||||||||||||
|
Definition at line 589 of file hp215.c. References _, DEBUG, t_camera::device, t_camera::dh, dprint(), FAIL, find_device(), HP215_ID, HP_VENDOR_ID, and SUCCESS. Referenced by main(). |
|
||||||||||||
|
Definition at line 511 of file hp215.c. References _, ACK, t_camera::dh, dprint(), FAIL, SUCCESS, and TIMEOUT. Referenced by hp_delete_all_pics(), hp_delete_some_pics(), hp_get_photo_album(), hp_get_previews(), hp_get_timeDate_cam(), hp_get_timeDate_pics(), hp_get_write_pics(), and hp_init_sequence(). |
|
||||||||||||
|
|
|
||||||||||||||||
|
Definition at line 1167 of file hp215.c. References _, FAIL, t_camera::pic, and SUCCESS. Referenced by main(). |
|
|
Definition at line 1939 of file hp215.c. Referenced by read_ini(). |
|
||||||||||||
|
Definition at line 2001 of file hp215.c. Referenced by read_ini(). |
|
|
Definition at line 2062 of file hp215.c. References _, t_mode::albm, t_mode::dateCam, t_mode::dateInPic, t_mode::dateInPicStr, t_mode::datePics, t_mode::dateStr, t_mode::delt, t_mode::forceDeletion, t_mode::html, t_mode::main, monNameLong, monNameShort, t_mode::picNumberRH, t_mode::picNumberRL, t_mode::picNumberRR, t_mode::picNumbers, t_mode::picNumbersAll, t_mode::picNumbersRH, t_mode::picNumbersRL, t_mode::picNumbersRR, t_mode::pics, t_mode::prev, t_mode::subDirFull, t_mode::subDirPrev, TIMEOUT, t_mode::tmp_html, and t_mode::tryInitCamTwice. Referenced by main(). |
|
||||||||||||
|
Definition at line 3870 of file hp215.c. References removeLockFile(). Referenced by acceptOptions(), gen_subDir(), getDateStr(), hp_append_file(), hp_create_html_page(), hp_get_write_pics(), hp_init_sequence(), main(), read_cmd(), read_ini(), and read_number(). |
|
||||||||||||||||
|
Definition at line 2164 of file hp215.c. References _, acceptOptions(), t_mode::html, t_mode::main, myExit(), t_mode::tmp_html, and usage(). Referenced by main(). |
|
|
Definition at line 1755 of file hp215.c. References _, acceptOptions(), ini_delComment(), ini_getNoElements(), and myExit(). Referenced by main(). |
|
||||||||||||||||
|
Referenced by acceptOptions(). |
|
|
This function deletes the lock file. Definition at line 3822 of file hp215.c. Referenced by checkPid(), main(), and myExit(). |
|
|
Definition at line 3709 of file hp215.c. References _, DEBUG_HEXDUMP, hex_dump(), hp_gen_cmd(), t_mode::printCmd_cmd, t_mode::printCmd_picNo, and SUCCESS. Referenced by main(). |
|
|
Definition at line 3621 of file hp215.c. References _, t_date::day, getDateStr(), t_date::hour, MAX_DS_STRLEN, t_date::min, t_date::month, MUST_NOT_USE_A_PICTURE_NUMBER, t_date::sec, and t_date::year. Referenced by main(). |
|
|
This function prints the usage of this programm. Definition at line 3896 of file hp215.c. References _. Referenced by acceptOptions(), and read_cmd(). |
1.3.2