herecast-commit Mailing List for Herecast
Status: Beta
Brought to you by:
mdpaciga
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(27) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: Mark P. <mdp...@us...> - 2005-07-25 20:02:12
|
Update of /cvsroot/herecast/herecast/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18587/src Modified Files: todo.txt Log Message: implemented "update even if not sitting on today screen" Index: todo.txt =================================================================== RCS file: /cvsroot/herecast/herecast/src/todo.txt,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** todo.txt 25 Jul 2005 20:00:59 -0000 1.34 --- todo.txt 25 Jul 2005 20:02:04 -0000 1.35 *************** *** 15,20 **** showing "ssid1, sdid2", as normal - check that lookup fails properly (still occasionally seems to get stuck when not logged in) - - Instead of scanning on "queryrefresh", use a timer, so subscription updates happen - regardless of whether the user rests on the today screen. - Subscriptions: update periodically (ie. even if not moving.) - might be able to optimise SubscriptionAgent->check so that it doesn't parse the URL if the --- 15,18 ---- |
|
From: Mark P. <mdp...@us...> - 2005-07-25 20:01:38
|
Update of /cvsroot/herecast/herecast/src/TodayItem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18282/src/TodayItem Modified Files: whereami.cpp Log Message: subscriptions are now updated shortly after first subscribing. This is done by calling Location->checkSubscriptions (and thus SubscriptionAgent->check) as part of the doScan method, which is run every 10 seconds. We should optimise Subscription->agent check to avoid parsing all URLs every 10 seconds, but this will do for now. Index: whereami.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/TodayItem/whereami.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** whereami.cpp 25 Jul 2005 18:41:38 -0000 1.11 --- whereami.cpp 25 Jul 2005 20:01:00 -0000 1.12 *************** *** 378,381 **** --- 378,382 ---- g_Location->checkUploadNeeded(); acMessage = g_Location->toString(&status); + g_Location->checkSubscriptions(); if (wcscmp(acMessage, g_acMessage)) { |
|
From: Mark P. <mdp...@us...> - 2005-07-25 20:01:35
|
Update of /cvsroot/herecast/herecast/src/HerecastXP In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18282/src/HerecastXP Modified Files: HerecastXP.cpp Log Message: subscriptions are now updated shortly after first subscribing. This is done by calling Location->checkSubscriptions (and thus SubscriptionAgent->check) as part of the doScan method, which is run every 10 seconds. We should optimise Subscription->agent check to avoid parsing all URLs every 10 seconds, but this will do for now. Index: HerecastXP.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastXP/HerecastXP.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** HerecastXP.cpp 21 Jul 2005 20:01:10 -0000 1.14 --- HerecastXP.cpp 25 Jul 2005 20:01:00 -0000 1.15 *************** *** 172,175 **** --- 172,176 ---- BOOL isReliable; acMessage = g_Location->toString(&g_status, &isReliable); + g_Location->checkSubscriptions(); if (wcscmp(acMessage, acPrevMessage)) { |
|
From: Mark P. <mdp...@us...> - 2005-07-25 20:01:22
|
Update of /cvsroot/herecast/herecast/src/HerecastLib/APDB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18282/src/HerecastLib/APDB Modified Files: Location.cpp Log Message: subscriptions are now updated shortly after first subscribing. This is done by calling Location->checkSubscriptions (and thus SubscriptionAgent->check) as part of the doScan method, which is run every 10 seconds. We should optimise Subscription->agent check to avoid parsing all URLs every 10 seconds, but this will do for now. Index: Location.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastLib/APDB/Location.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Location.cpp 21 Jul 2005 19:56:32 -0000 1.9 --- Location.cpp 25 Jul 2005 20:01:00 -0000 1.10 *************** *** 159,165 **** pClosestAp = pAp; - - SubscriptionAgent* pSubscriptionAgent = SubscriptionAgent::instance(); - pSubscriptionAgent->check(pClosestAp); } --- 159,162 ---- *************** *** 297,300 **** --- 294,304 ---- + void Location::checkSubscriptions() + { + SubscriptionAgent* pSubscriptionAgent = SubscriptionAgent::instance(); + pSubscriptionAgent->check(pClosestAp); + } + + int Location::execAPIMsg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { |
|
From: Mark P. <mdp...@us...> - 2005-07-25 20:01:22
|
Update of /cvsroot/herecast/herecast/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18282/src Modified Files: Herecast.vco changelog.txt todo.txt Log Message: subscriptions are now updated shortly after first subscribing. This is done by calling Location->checkSubscriptions (and thus SubscriptionAgent->check) as part of the doScan method, which is run every 10 seconds. We should optimise Subscription->agent check to avoid parsing all URLs every 10 seconds, but this will do for now. Index: changelog.txt =================================================================== RCS file: /cvsroot/herecast/herecast/src/changelog.txt,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** changelog.txt 24 Jul 2005 19:34:20 -0000 1.18 --- changelog.txt 25 Jul 2005 20:00:59 -0000 1.19 *************** *** 1,5 **** Version 1.06 - in progress ! - Today item and subscriptions are now updated even - On startup, the new subscription dialog won't pop up until a location fix has been established. --- 1,7 ---- Version 1.06 - in progress ! - Subscriptions are now updated shortly after subscribing. ! - Today item and subscriptions are now updated even if you are not sitting ! on the Today screen. - On startup, the new subscription dialog won't pop up until a location fix has been established. Index: todo.txt =================================================================== RCS file: /cvsroot/herecast/herecast/src/todo.txt,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** todo.txt 22 Apr 2005 17:31:16 -0000 1.33 --- todo.txt 25 Jul 2005 20:00:59 -0000 1.34 *************** *** 18,22 **** regardless of whether the user rests on the today screen. - Subscriptions: update periodically (ie. even if not moving.) ! - update sooner after first subscribe (I think it doesn't update until the user moves) - be more forgiving of format errors in input files (usually freezes without explaination now) - most recently seen building can be mis-set if a stray signal comes in from another building. --- 18,23 ---- regardless of whether the user rests on the today screen. - Subscriptions: update periodically (ie. even if not moving.) ! - might be able to optimise SubscriptionAgent->check so that it doesn't parse the URL if the ! closest AP hasn't changed. (This is called every 10 seconds or so.) - be more forgiving of format errors in input files (usually freezes without explaination now) - most recently seen building can be mis-set if a stray signal comes in from another building. Index: Herecast.vco =================================================================== RCS file: /cvsroot/herecast/herecast/src/Herecast.vco,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 Binary files /tmp/cvsSHCOJB and /tmp/cvsePZS5F differ |
|
From: Mark P. <mdp...@us...> - 2005-07-25 19:38:41
|
Update of /cvsroot/herecast/herecast/src/HerecastTester In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12731/src/HerecastTester Modified Files: HerecastAPI.cpp HerecastAPI.h HerecastTester.cpp Log Message: moved dynamic DLL loading logic to HerecastAPI Index: HerecastTester.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastTester/HerecastTester.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** HerecastTester.cpp 25 Jul 2005 19:31:20 -0000 1.3 --- HerecastTester.cpp 25 Jul 2005 19:38:31 -0000 1.4 *************** *** 35,63 **** // Example of checking to see if Herecast is running ! if (!g_herecast.findHerecast()) { ! ! hDLL = LoadLibrary(TEXT("whereami.dll")); ! ! if (!hDLL) { ! MessageBox(0, TEXT("Herecast is not running, not installed"), TEXT("Error"), 0); ! return 1; ! } ! else { ! HerecastInit = GetProcAddress((HMODULE)hDLL, TEXT("HerecastInit")); ! HerecastCleanup = GetProcAddress((HMODULE)hDLL, TEXT("HerecastCleanup")); ! ! if (!HerecastInit || !HerecastCleanup) { ! MessageBox(0, TEXT("Herecast is not running, and DLL was invalid"), TEXT("Error"), 0); ! return 1; ! } ! ! HerecastInit(); ! ! if (!g_herecast.findHerecast()) { ! MessageBox(0, TEXT("Herecast is not running, and could not load"), TEXT("Error"), 0); ! return 1; ! } ! } ! } --- 35,40 ---- // Example of checking to see if Herecast is running ! if (!g_herecast.findHerecast(true)) { ! MessageBox(0, TEXT("Herecast is not running, not installed"), TEXT("Error"), 0); } *************** *** 98,109 **** - // If the DLL was loaded dynamically, shut it down - - if (hDLL) { - HerecastCleanup(); - FreeLibrary((HMODULE)hDLL); - } - - return 0; } --- 75,78 ---- Index: HerecastAPI.h =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastTester/HerecastAPI.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** HerecastAPI.h 25 Jul 2005 19:26:11 -0000 1.3 --- HerecastAPI.h 25 Jul 2005 19:38:31 -0000 1.4 *************** *** 35,38 **** --- 35,42 ---- WCHAR* lastString; // last string received via WM_COPYDATA + HINSTANCE hDLL; // handle to the dynamically-loaded DLL + FARPROC HerecastInit; // and its functions + FARPROC HerecastCleanup; + unsigned long getInt(int msg); // get an integer from Herecast WCHAR* getString(int msg); // get a string from Herecast *************** *** 49,53 **** // findHerecast returns NULL if Herecast isn't running ! HWND findHerecast(); --- 53,57 ---- // findHerecast returns NULL if Herecast isn't running ! HWND findHerecast(bool forceLoad = false); Index: HerecastAPI.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastTester/HerecastAPI.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HerecastAPI.cpp 21 Jul 2005 20:07:03 -0000 1.2 --- HerecastAPI.cpp 25 Jul 2005 19:38:30 -0000 1.3 *************** *** 7,10 **** --- 7,11 ---- #include "HerecastAPI.h" + HerecastAPI::HerecastAPI() { *************** *** 12,23 **** --- 13,37 ---- hwndHerecast = NULL; hwndSelf = NULL; + hDLL = NULL; + HerecastInit = NULL; + HerecastCleanup = NULL; } + HerecastAPI::~HerecastAPI() { free(lastString); lastString = NULL; + + + // If the DLL was loaded dynamically, unload it + + if (hDLL) { + HerecastCleanup(); + FreeLibrary((HMODULE)hDLL); + } } + LRESULT CALLBACK HerecastAPI::My_WM_COPYDATA(HWND hWnd, UINT uimessage, WPARAM wParam, LPARAM lParam) { *************** *** 30,36 **** ! HWND HerecastAPI::findHerecast() { hwndHerecast = FindWindow(TEXT("Herecast"), NULL); return hwndHerecast; } --- 44,70 ---- ! HWND HerecastAPI::findHerecast(bool forceLoad) { hwndHerecast = FindWindow(TEXT("Herecast"), NULL); + + if (!hwndHerecast && forceLoad) { + hDLL = LoadLibrary(TEXT("whereami.dll")); + + if (!hDLL) { + return NULL; + } + + HerecastInit = GetProcAddress((HMODULE)hDLL, TEXT("HerecastInit")); + HerecastCleanup = GetProcAddress((HMODULE)hDLL, TEXT("HerecastCleanup")); + + if (!HerecastInit || !HerecastCleanup) { + return NULL; + } + + HerecastInit(); + + hwndHerecast = FindWindow(TEXT("Herecast"), NULL); + } + return hwndHerecast; } |
|
From: Mark P. <mdp...@us...> - 2005-07-25 19:31:28
|
Update of /cvsroot/herecast/herecast/src/HerecastTester In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11349/src/HerecastTester Modified Files: HerecastTester.cpp Log Message: added example of loading the DLL dynamically Index: HerecastTester.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastTester/HerecastTester.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HerecastTester.cpp 21 Jul 2005 20:07:03 -0000 1.2 --- HerecastTester.cpp 25 Jul 2005 19:31:20 -0000 1.3 *************** *** 20,24 **** - int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, --- 20,23 ---- *************** *** 26,29 **** --- 25,32 ---- int nCmdShow) { + HINSTANCE hDLL = NULL; + FARPROC HerecastInit = NULL; + FARPROC HerecastCleanup = NULL; + InitilizeClasses(hInstance); CreateMyWindow(hInstance); *************** *** 33,38 **** if (!g_herecast.findHerecast()) { ! MessageBox(0, TEXT("Herecast is not running"), TEXT("Error"), 0); ! return 1; } --- 36,63 ---- if (!g_herecast.findHerecast()) { ! ! hDLL = LoadLibrary(TEXT("whereami.dll")); ! ! if (!hDLL) { ! MessageBox(0, TEXT("Herecast is not running, not installed"), TEXT("Error"), 0); ! return 1; ! } ! else { ! HerecastInit = GetProcAddress((HMODULE)hDLL, TEXT("HerecastInit")); ! HerecastCleanup = GetProcAddress((HMODULE)hDLL, TEXT("HerecastCleanup")); ! ! if (!HerecastInit || !HerecastCleanup) { ! MessageBox(0, TEXT("Herecast is not running, and DLL was invalid"), TEXT("Error"), 0); ! return 1; ! } ! ! HerecastInit(); ! ! if (!g_herecast.findHerecast()) { ! MessageBox(0, TEXT("Herecast is not running, and could not load"), TEXT("Error"), 0); ! return 1; ! } ! } ! } *************** *** 62,66 **** - // Example of parsing a URL (could be any string, really) --- 87,90 ---- *************** *** 74,77 **** --- 98,108 ---- + // If the DLL was loaded dynamically, shut it down + + if (hDLL) { + HerecastCleanup(); + FreeLibrary((HMODULE)hDLL); + } + return 0; |
|
From: Mark P. <mdp...@us...> - 2005-07-25 19:26:26
|
Update of /cvsroot/herecast/herecast/src/HerecastTester In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10018/src/HerecastTester Modified Files: HerecastAPI.h Log Message: added a missing ifndef/define Index: HerecastAPI.h =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastTester/HerecastAPI.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HerecastAPI.h 21 Jul 2005 20:07:03 -0000 1.2 --- HerecastAPI.h 25 Jul 2005 19:26:11 -0000 1.3 *************** *** 24,27 **** --- 24,29 ---- */ + #ifndef __HERECASTAPI_H + #define __HERECASTAPI_H #include "herecast.h" |
|
From: Mark P. <mdp...@us...> - 2005-07-25 18:41:54
|
Update of /cvsroot/herecast/herecast/src/TodayItem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32257/src/TodayItem Modified Files: whereami.cpp Log Message: moved HerecastCleanup call to fix device lockup. Index: whereami.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/TodayItem/whereami.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** whereami.cpp 24 Jul 2005 20:28:49 -0000 1.10 --- whereami.cpp 25 Jul 2005 18:41:38 -0000 1.11 *************** *** 38,50 **** #define UPDATE_INTERVAL_MS 10000 //how often to do location scan ! //global variables ! HICON g_hIcon; ! HWND g_hWnd; ! HWND g_hWndDummy; ! HINSTANCE g_hInst2; ! TCHAR g_acMessage[MESSAGE_BUF] = {0}; ! Location *g_Location; ! BOOL g_refreshNeeded = FALSE; ! WORD g_iconId = IDI_SMALLICON; --- 38,50 ---- #define UPDATE_INTERVAL_MS 10000 //how often to do location scan ! //global variables ! HICON g_hIcon; ! HWND g_hWnd; ! HWND g_hWndDummy = NULL; ! HINSTANCE g_hInst2; ! TCHAR g_acMessage[MESSAGE_BUF] = {0}; ! Location *g_Location; ! BOOL g_refreshNeeded = FALSE; ! WORD g_iconId = IDI_SMALLICON; *************** *** 57,152 **** /*************************************************************************/ ! /* Entry point for the dll */ /*************************************************************************/ BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { ! switch (ul_reason_for_call) ! { ! case DLL_PROCESS_ATTACH: ! ! // The DLL is being loaded for the first time by a given process. ! // Perform per-process initialization here. If the initialization ! // is successful, return TRUE; if unsuccessful, return FALSE. ! g_hInst2 = (HINSTANCE)hModule; ! ! //load the icon ! g_hIcon = (HICON)LoadImage(g_hInst2,MAKEINTRESOURCE(IDI_DISPLAYICON),IMAGE_ICON,16,16,LR_DEFAULTCOLOR ); ! WindowsUtils_SetNotificationIcon(g_hIcon); ! ! //initilize the application class, and set the global window handle ! UnregisterClass((LPCTSTR)LoadString(g_hInst2, IDS_TODAY_APPNAME,0,0), g_hInst2); ! UnregisterClass(TEXT("Herecast"), g_hInst2); ! InitilizeClasses(); ! g_hWnd = 0; g_Location = NULL; ! ! break; ! ! case DLL_PROCESS_DETACH: ! // The DLL is being unloaded by a given process. Do any ! // per-process clean up here, such as undoing what was done in ! // DLL_PROCESS_ATTACH. The return value is ignored. ! DestroyIcon(g_hIcon); ! //HerecastCleanup(); ! DestroyWindow(g_hWndDummy); ! UnregisterClass((LPCTSTR)LoadString(g_hInst2, IDS_TODAY_APPNAME,0,0), g_hInst2); ! UnregisterClass(TEXT("Herecast"), g_hInst2); ! g_hInst2 = NULL; ! break; ! } ! ! return TRUE; } /*************************************************************************/ ! /* Handle any messages that may be needed for the plugin */ ! /* Handled messages: */ ! /* WM_TODAYCUSTOM_QUERYREFRESHCACHE */ ! /* WM_CREATE */ ! /* WM_LBUTTONUP */ ! /* WM_PAINT */ ! /* WM_DESTROY */ /*************************************************************************/ LRESULT CALLBACK WndProc (HWND hwnd, UINT uimessage, WPARAM wParam, LPARAM lParam) { ! switch (uimessage) ! { ! //check to see if a refresh is required ! case WM_TODAYCUSTOM_QUERYREFRESHCACHE: ! { ! INT iItemHeight; ! BOOL bReturn = FALSE; ! TODAYLISTITEM *ptli = (TODAYLISTITEM *)wParam; ! if (WaitForSingleObject(SHELL_API_READY_EVENT, 0) == WAIT_TIMEOUT) ! { ! return FALSE; ! } ! ! // adjust the height of the today item ! iItemHeight = 20; ! ! // determine if the item text should be changed if (g_refreshNeeded) { g_refreshNeeded = FALSE; ! bReturn = TRUE; } if (NULL == ptli) { ! bReturn = TRUE; } else if (0 == ptli->cyp) { ! ptli->cyp = iItemHeight; ! bReturn = TRUE; ! } ! ! return bReturn; ! ! } ! ! case WM_LBUTTONUP: if (LOWORD(lParam) > 16) { //clicked on today item text if (g_Location) --- 57,150 ---- /*************************************************************************/ ! /* Entry point for the dll */ /*************************************************************************/ BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { ! switch (ul_reason_for_call) ! { ! case DLL_PROCESS_ATTACH: ! ! // The DLL is being loaded for the first time by a given process. ! // Perform per-process initialization here. If the initialization ! // is successful, return TRUE; if unsuccessful, return FALSE. ! g_hInst2 = (HINSTANCE)hModule; ! ! //load the icon ! g_hIcon = (HICON)LoadImage(g_hInst2,MAKEINTRESOURCE(IDI_DISPLAYICON),IMAGE_ICON,16,16,LR_DEFAULTCOLOR ); ! WindowsUtils_SetNotificationIcon(g_hIcon); ! ! //initilize the application class, and set the global window handle ! UnregisterClass((LPCTSTR)LoadString(g_hInst2, IDS_TODAY_APPNAME,0,0), g_hInst2); ! UnregisterClass(TEXT("Herecast"), g_hInst2); ! InitilizeClasses(); ! g_hWnd = 0; g_Location = NULL; ! ! break; ! ! case DLL_PROCESS_DETACH: ! // The DLL is being unloaded by a given process. Do any ! // per-process clean up here, such as undoing what was done in ! // DLL_PROCESS_ATTACH. The return value is ignored. ! DestroyIcon(g_hIcon); ! UnregisterClass((LPCTSTR)LoadString(g_hInst2, IDS_TODAY_APPNAME,0,0), g_hInst2); ! UnregisterClass(TEXT("Herecast"), g_hInst2); ! g_hInst2 = NULL; ! break; ! } ! ! return TRUE; } /*************************************************************************/ ! /* Handle any messages that may be needed for the plugin */ ! /* Handled messages: */ ! /* WM_TODAYCUSTOM_QUERYREFRESHCACHE */ ! /* WM_CREATE */ ! /* WM_LBUTTONUP */ ! /* WM_PAINT */ ! /* WM_DESTROY */ /*************************************************************************/ LRESULT CALLBACK WndProc (HWND hwnd, UINT uimessage, WPARAM wParam, LPARAM lParam) { ! switch (uimessage) ! { ! //check to see if a refresh is required ! case WM_TODAYCUSTOM_QUERYREFRESHCACHE: ! { ! INT iItemHeight; ! BOOL bReturn = FALSE; ! TODAYLISTITEM *ptli = (TODAYLISTITEM *)wParam; ! if (WaitForSingleObject(SHELL_API_READY_EVENT, 0) == WAIT_TIMEOUT) ! { ! return FALSE; ! } ! ! // adjust the height of the today item ! iItemHeight = 20; ! ! // determine if the item text should be changed if (g_refreshNeeded) { g_refreshNeeded = FALSE; ! bReturn = TRUE; } if (NULL == ptli) { ! bReturn = TRUE; } else if (0 == ptli->cyp) { ! ptli->cyp = iItemHeight; ! bReturn = TRUE; ! } ! ! return bReturn; ! ! } ! ! case WM_LBUTTONUP: if (LOWORD(lParam) > 16) { //clicked on today item text if (g_Location) *************** *** 156,254 **** dlgScanner2_create(g_hInst2, SW_SHOW); } ! break; ! ! case WM_PAINT: ! PAINTSTRUCT ps; ! RECT rcWindBounds; ! RECT rcMyBounds; ! HDC hDC; ! HFONT hFontOld; ! COLORREF crText; ! GetWindowRect( hwnd, &rcWindBounds); ! ! hDC = BeginPaint(hwnd, &ps); ! ! // create a custom rectangle relative to the client area ! rcMyBounds.left = 0; ! rcMyBounds.top = 0; ! rcMyBounds.right = rcWindBounds.right - rcWindBounds.left; ! rcMyBounds.bottom = rcWindBounds.bottom - rcWindBounds.top; ! ! // draw the icon on the screen ! SetBkMode(hDC, TRANSPARENT); ! DrawIcon(hDC, 2, 0, g_hIcon); ! ! BOOL bIsFarEast; ! LOGFONT lf; ! HFONT hSysFont; ! HFONT hFont; ! //determine if this is a Far East platform ! switch (PRIMARYLANGID(LANGIDFROMLCID(GetSystemDefaultLCID()))) ! { ! case LANG_CHINESE: ! case LANG_KOREAN: ! case LANG_JAPANESE: ! bIsFarEast = TRUE; ! break; ! ! default: ! bIsFarEast = FALSE; ! break; ! } ! hSysFont = (HFONT) GetStockObject(SYSTEM_FONT); ! GetObject(hSysFont, sizeof(LOGFONT), &lf); ! // If it is far east, use a normal font at 9 points, ! // otherwise use a bold font as 8 points ! if (bIsFarEast) ! { ! lf.lfWeight = FW_NORMAL; ! // Calculate the font size, making sure to round the result to the nearest integer ! lf.lfHeight = (long) -((9.0 * (double)GetDeviceCaps(hDC, LOGPIXELSY) / 72.0)+.5); ! } ! else ! { ! lf.lfWeight = FW_NORMAL; //FW_BOLD; ! // Calculate the font size, making sure to round the result to the nearest integer ! lf.lfHeight = (long) -((8.0 * (double)GetDeviceCaps(hDC, LOGPIXELSY) / 72.0)+.5); ! } ! // create the font ! hFont = CreateFontIndirect(&lf); ! ! // Select the system font into the device context ! hFontOld = (HFONT) SelectObject(hDC, hFont); ! // determine the theme's current text color ! // this color will change when the user picks a new theme, ! // so get it each time the display needs to be painted ! crText = SendMessage(GetParent(hwnd), TODAYM_GETCOLOR, (WPARAM) TODAYCOLOR_TEXT, NULL); ! // set that color ! SetTextColor(hDC, crText); ! // draw the item text ! rcMyBounds.left = rcMyBounds.left + 30; ! DrawText(hDC, g_acMessage, -1, &rcMyBounds, DT_LEFT); ! ! // Select the previous font back into the device context ! SelectObject(hDC, hFontOld); ! DeleteObject(hFont); ! EndPaint(hwnd, &ps); ! break; ! ! // this fills in the background with the today screen image ! case WM_ERASEBKGND: ! TODAYDRAWWATERMARKINFO dwi; ! dwi.hdc = (HDC)wParam; ! GetClientRect(hwnd, &dwi.rc); ! ! dwi.hwnd = hwnd; ! SendMessage(GetParent(hwnd), TODAYM_DRAWWATERMARK, 0,(LPARAM)&dwi); ! return TRUE; case WM_COMMAND: --- 154,252 ---- dlgScanner2_create(g_hInst2, SW_SHOW); } ! break; ! ! case WM_PAINT: ! PAINTSTRUCT ps; ! RECT rcWindBounds; ! RECT rcMyBounds; ! HDC hDC; ! HFONT hFontOld; ! COLORREF crText; ! GetWindowRect( hwnd, &rcWindBounds); ! ! hDC = BeginPaint(hwnd, &ps); ! ! // create a custom rectangle relative to the client area ! rcMyBounds.left = 0; ! rcMyBounds.top = 0; ! rcMyBounds.right = rcWindBounds.right - rcWindBounds.left; ! rcMyBounds.bottom = rcWindBounds.bottom - rcWindBounds.top; ! ! // draw the icon on the screen ! SetBkMode(hDC, TRANSPARENT); ! DrawIcon(hDC, 2, 0, g_hIcon); ! ! BOOL bIsFarEast; ! LOGFONT lf; ! HFONT hSysFont; ! HFONT hFont; ! //determine if this is a Far East platform ! switch (PRIMARYLANGID(LANGIDFROMLCID(GetSystemDefaultLCID()))) ! { ! case LANG_CHINESE: ! case LANG_KOREAN: ! case LANG_JAPANESE: ! bIsFarEast = TRUE; ! break; ! ! default: ! bIsFarEast = FALSE; ! break; ! } ! hSysFont = (HFONT) GetStockObject(SYSTEM_FONT); ! GetObject(hSysFont, sizeof(LOGFONT), &lf); ! // If it is far east, use a normal font at 9 points, ! // otherwise use a bold font as 8 points ! if (bIsFarEast) ! { ! lf.lfWeight = FW_NORMAL; ! // Calculate the font size, making sure to round the result to the nearest integer ! lf.lfHeight = (long) -((9.0 * (double)GetDeviceCaps(hDC, LOGPIXELSY) / 72.0)+.5); ! } ! else ! { ! lf.lfWeight = FW_NORMAL; //FW_BOLD; ! // Calculate the font size, making sure to round the result to the nearest integer ! lf.lfHeight = (long) -((8.0 * (double)GetDeviceCaps(hDC, LOGPIXELSY) / 72.0)+.5); ! } ! // create the font ! hFont = CreateFontIndirect(&lf); ! ! // Select the system font into the device context ! hFontOld = (HFONT) SelectObject(hDC, hFont); ! // determine the theme's current text color ! // this color will change when the user picks a new theme, ! // so get it each time the display needs to be painted ! crText = SendMessage(GetParent(hwnd), TODAYM_GETCOLOR, (WPARAM) TODAYCOLOR_TEXT, NULL); ! // set that color ! SetTextColor(hDC, crText); ! // draw the item text ! rcMyBounds.left = rcMyBounds.left + 30; ! DrawText(hDC, g_acMessage, -1, &rcMyBounds, DT_LEFT); ! ! // Select the previous font back into the device context ! SelectObject(hDC, hFontOld); ! DeleteObject(hFont); ! EndPaint(hwnd, &ps); ! break; ! ! // this fills in the background with the today screen image ! case WM_ERASEBKGND: ! TODAYDRAWWATERMARKINFO dwi; ! dwi.hdc = (HDC)wParam; ! GetClientRect(hwnd, &dwi.rc); ! ! dwi.hwnd = hwnd; ! SendMessage(GetParent(hwnd), TODAYM_DRAWWATERMARK, 0,(LPARAM)&dwi); ! return TRUE; case WM_COMMAND: *************** *** 256,259 **** --- 254,262 ---- break; + case WM_DESTROY: + // destroy the main dummy window too + HerecastCleanup(); + return 0; + case WM_NOTIFY: NMHDR *nmhptr = (LPNMHDR)lParam; *************** *** 273,279 **** } break; ! } ! return DefWindowProc (hwnd, uimessage, wParam, lParam) ; } --- 276,282 ---- } break; ! } ! return DefWindowProc (hwnd, uimessage, wParam, lParam) ; } *************** *** 301,312 **** break; ! case WM_DESTROY: KillTimer(hWnd, ID_TIMER_UPDATE); WebAgent::shutdown(); ! break; case WM_COMMAND: ! wmId = LOWORD(wParam); ! wmEvent = HIWORD(wParam); switch (wmId) { case IDMSG_ADD_SUBSCRIPTION: { --- 304,315 ---- break; ! case WM_DESTROY: KillTimer(hWnd, ID_TIMER_UPDATE); WebAgent::shutdown(); ! break; case WM_COMMAND: ! wmId = LOWORD(wParam); ! wmEvent = HIWORD(wParam); switch (wmId) { case IDMSG_ADD_SUBSCRIPTION: { *************** *** 391,423 **** /*************************************************************************/ ! /* Create and register our window class for the today item */ /*************************************************************************/ INT InitilizeClasses() { ! WNDCLASS wc; ! memset(&wc, 0, sizeof(wc)); ! ! wc.style = 0; ! wc.lpfnWndProc = (WNDPROC) WndProc; ! wc.hInstance = g_hInst2; ! wc.hIcon = 0; ! wc.hCursor = 0; ! wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); ! //wc.lpszClassName = (LPCTSTR)LoadString(g_hInst2, IDS_TODAY_WINDOWCLASS,0,0); wc.lpszClassName = TEXT("dlgHerecastTodayItemClass"); ! ! //register our today item window ! if(!RegisterClass(&wc)) { ! return 0 ; ! } // create another class for the "public" window, similar to the above ! wc.lpfnWndProc = (WNDPROC) WndProc_dummy; wc.lpszClassName = TEXT("Herecast"); ! ! //register our window ! if(!RegisterClass(&wc)) { ! return 0 ; ! } return 1; } --- 394,426 ---- /*************************************************************************/ ! /* Create and register our window class for the today item */ /*************************************************************************/ INT InitilizeClasses() { ! WNDCLASS wc; ! memset(&wc, 0, sizeof(wc)); ! ! wc.style = 0; ! wc.lpfnWndProc = (WNDPROC) WndProc; ! wc.hInstance = g_hInst2; ! wc.hIcon = 0; ! wc.hCursor = 0; ! wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); ! //wc.lpszClassName = (LPCTSTR)LoadString(g_hInst2, IDS_TODAY_WINDOWCLASS,0,0); wc.lpszClassName = TEXT("dlgHerecastTodayItemClass"); ! ! //register our today item window ! if(!RegisterClass(&wc)) { ! return 0 ; ! } // create another class for the "public" window, similar to the above ! wc.lpfnWndProc = (WNDPROC) WndProc_dummy; wc.lpszClassName = TEXT("Herecast"); ! ! //register our window ! if(!RegisterClass(&wc)) { ! return 0 ; ! } return 1; } *************** *** 457,461 **** /*************************************************************************/ ! /* Initilize the DLL by creating a new window */ /*************************************************************************/ HWND InitializeCustomItem(TODAYLISTITEM *ptli, HWND hwndParent) --- 460,464 ---- /*************************************************************************/ ! /* Initilize the DLL by creating a new window */ /*************************************************************************/ HWND InitializeCustomItem(TODAYLISTITEM *ptli, HWND hwndParent) *************** *** 473,482 **** LPCTSTR className = TEXT("dlgHerecastTodayItemClass"); //LPCTSTR className=(LPCTSTR)LoadString(g_hInst2,IDS_TODAY_WINDOWCLASS,0,0); ! LPCTSTR appName = (LPCTSTR)LoadString(g_hInst2,IDS_TODAY_APPNAME,0,0); ! ! //create a new window ! g_hWnd = CreateWindow(className,appName,WS_VISIBLE | WS_CHILD, ! CW_USEDEFAULT,CW_USEDEFAULT,240,0,hwndParent, NULL, g_hInst2, NULL) ; ! // if the second window didn't work, destroy both and return if (!g_hWnd) { --- 476,485 ---- LPCTSTR className = TEXT("dlgHerecastTodayItemClass"); //LPCTSTR className=(LPCTSTR)LoadString(g_hInst2,IDS_TODAY_WINDOWCLASS,0,0); ! LPCTSTR appName = (LPCTSTR)LoadString(g_hInst2,IDS_TODAY_APPNAME,0,0); ! ! //create a new window ! g_hWnd = CreateWindow(className,appName,WS_VISIBLE | WS_CHILD, ! CW_USEDEFAULT,CW_USEDEFAULT,240,0,hwndParent, NULL, g_hInst2, NULL) ; ! // if the second window didn't work, destroy both and return if (!g_hWnd) { *************** *** 485,500 **** } ! // attach our winproc to the newly created window ! SetWindowLong(g_hWnd, GWL_WNDPROC, (LONG) WndProc); ! ! //display the window ! ShowWindow (g_hWnd, SW_SHOWNORMAL); ! UpdateWindow (g_hWnd) ; ! return g_hWnd; } /*************************************************************************/ ! /* Message Handler for the options dialog */ /*************************************************************************/ LRESULT WINAPI CustomItemOptionsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) --- 488,503 ---- } ! // attach our winproc to the newly created window ! SetWindowLong(g_hWnd, GWL_WNDPROC, (LONG) WndProc); ! ! //display the window ! ShowWindow (g_hWnd, SW_SHOWNORMAL); ! UpdateWindow (g_hWnd) ; ! return g_hWnd; } /*************************************************************************/ ! /* Message Handler for the options dialog */ /*************************************************************************/ LRESULT WINAPI CustomItemOptionsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) |
|
From: Mark P. <mdp...@us...> - 2005-07-24 20:28:58
|
Update of /cvsroot/herecast/herecast/src/TodayItem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9715/src/TodayItem Modified Files: whereami.cpp Log Message: moved init code into HerecastInit and HerecastCleanup, so it can be run without the today item Index: whereami.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/TodayItem/whereami.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** whereami.cpp 24 Jul 2005 19:34:20 -0000 1.9 --- whereami.cpp 24 Jul 2005 20:28:49 -0000 1.10 *************** *** 52,55 **** --- 52,57 ---- static INT InitilizeClasses(); VOID doScan(HWND hWnd); + extern "C" __declspec(dllexport) HWND HerecastInit(); + extern "C" __declspec(dllexport) void HerecastCleanup(); *************** *** 87,91 **** DestroyIcon(g_hIcon); ! DestroyWindow(g_hWndDummy); UnregisterClass((LPCTSTR)LoadString(g_hInst2, IDS_TODAY_APPNAME,0,0), g_hInst2); --- 89,94 ---- DestroyIcon(g_hIcon); ! //HerecastCleanup(); ! DestroyWindow(g_hWndDummy); UnregisterClass((LPCTSTR)LoadString(g_hInst2, IDS_TODAY_APPNAME,0,0), g_hInst2); *************** *** 420,423 **** --- 423,459 ---- } + + /*************************************************************************/ + /* Initilize/Cleanup the dummy window */ + /*************************************************************************/ + + extern "C" __declspec(dllexport) + HWND HerecastInit() + { + // create "dummy" window at the top level to receive messages from + // other applications + g_hWndDummy = CreateWindow(TEXT("Herecast"), TEXT("Herecast"), 0, + CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, g_hInst2, NULL); + + if (g_hWndDummy) { + ShowWindow(g_hWndDummy, SW_HIDE); //this window is never actually shown + UpdateWindow(g_hWndDummy); + } + + return g_hWndDummy; + } + + + extern "C" __declspec(dllexport) + void HerecastCleanup() + { + if (g_hWndDummy) { + DestroyWindow(g_hWndDummy); + g_hWndDummy = NULL; + } + } + + + /*************************************************************************/ /* Initilize the DLL by creating a new window */ *************** *** 430,447 **** } ! ! // create "dummy" window at the top level to receive messages from ! // other applications ! g_hWndDummy = CreateWindow(TEXT("Herecast"), TEXT("Herecast"), 0, ! CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, g_hInst2, NULL); ! ! if (!g_hWndDummy) { return NULL; } - ShowWindow(g_hWndDummy, SW_HIDE); //this window is never actually shown - UpdateWindow(g_hWndDummy); - - // create the main today item window LPCTSTR className = TEXT("dlgHerecastTodayItemClass"); --- 466,473 ---- } ! if (!HerecastInit()) { return NULL; } // create the main today item window LPCTSTR className = TEXT("dlgHerecastTodayItemClass"); *************** *** 455,460 **** // if the second window didn't work, destroy both and return if (!g_hWnd) { ! DestroyWindow(g_hWndDummy); ! g_hWndDummy = NULL; return NULL; } --- 481,485 ---- // if the second window didn't work, destroy both and return if (!g_hWnd) { ! HerecastCleanup(); return NULL; } |
|
From: Mark P. <mdp...@us...> - 2005-07-24 19:34:29
|
Update of /cvsroot/herecast/herecast/src/TodayItem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29530/src/TodayItem Modified Files: whereami.cpp Log Message: moved important parts to a new doScan function and the dummy window (more like the XP version); re-arranged some stuff and deleted unused variables Index: whereami.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/TodayItem/whereami.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** whereami.cpp 24 Jul 2005 18:21:54 -0000 1.8 --- whereami.cpp 24 Jul 2005 19:34:20 -0000 1.9 *************** *** 35,57 **** #include "../HerecastLib/LibMain/herecast.h" ! #define INVALID_HEIGHT 0xFFFFFFFF ! #define UPDATE_INTERVAL 5 // * 2 seconds? ! #define UPDATE_INTERVAL_MS 10000 //applies to the new fake window //global variables HICON g_hIcon; - UINT g_plugInHeight; HWND g_hWnd; HWND g_hWndDummy; HINSTANCE g_hInst2; ! BOOL g_bFirstDisplay = TRUE; ! HWND g_hMessage; ! TCHAR g_acMessage[MESSAGE_BUF]; ! BOOL g_bUserSet; Location *g_Location; // forward function declarations static INT InitilizeClasses(); /*************************************************************************/ --- 35,56 ---- #include "../HerecastLib/LibMain/herecast.h" ! #define INVALID_HEIGHT 0xFFFFFFFF ! #define UPDATE_INTERVAL_MS 10000 //how often to do location scan //global variables HICON g_hIcon; HWND g_hWnd; HWND g_hWndDummy; HINSTANCE g_hInst2; ! TCHAR g_acMessage[MESSAGE_BUF] = {0}; Location *g_Location; + BOOL g_refreshNeeded = FALSE; + WORD g_iconId = IDI_SMALLICON; // forward function declarations static INT InitilizeClasses(); + VOID doScan(HWND hWnd); + /*************************************************************************/ *************** *** 116,124 **** { INT iItemHeight; ! TCHAR *acMessage; ! ! BOOL bReturn = FALSE; ! ! TODAYLISTITEM *ptli = (TODAYLISTITEM *)wParam; --- 115,119 ---- { INT iItemHeight; ! BOOL bReturn = FALSE; TODAYLISTITEM *ptli = (TODAYLISTITEM *)wParam; *************** *** 132,179 **** iItemHeight = 20; ! // determine location and see if it has changed ! //static time_t nextUpdate = UPDATE_INTERVAL; ! static time_t nextUpdate = 0; ! static bFirstTime = true; ! if (nextUpdate-- <= 0){ ! ! // if the device was just rebooted, we can't do new Location too fast. ! if (bFirstTime && (GetTickCount() < 20000)) { ! acMessage = L"Searching for a wireless signal..."; ! bFirstTime = false; ! nextUpdate = 2; ! } ! else { ! nextUpdate = UPDATE_INTERVAL; ! ! if (!g_Location) { ! g_Location = new Location(g_hInst2); ! WindowsUtils_SetNotificationWindow(hwnd); ! ! // when the program is started, check if any new subscriptions ! // have been added while the program was closed. ! // TODO: don't do this until after a location fix has been established ! SubscriptionAgent *pSA = SubscriptionAgent::instance(); ! pSA->checkNew(g_hInst2, hwnd); ! } ! ! g_Location->scan(); ! g_Location->checkUploadNeeded(); ! ! acMessage = g_Location->toString(); ! } ! ! if(wcscmp(acMessage, g_acMessage) != 0) { ! wcscpy(g_acMessage, acMessage); ! bReturn = TRUE; ! } ! } ! ! if (NULL == ptli) bReturn = TRUE; ! ! if (0 == ptli->cyp) ! { ptli->cyp = iItemHeight; bReturn = TRUE; --- 127,140 ---- iItemHeight = 20; ! // determine if the item text should be changed ! if (g_refreshNeeded) { ! g_refreshNeeded = FALSE; ! bReturn = TRUE; ! } ! if (NULL == ptli) { bReturn = TRUE; ! } ! else if (0 == ptli->cyp) { ptli->cyp = iItemHeight; bReturn = TRUE; *************** *** 182,191 **** return bReturn; - } - case WM_CREATE: - break; - case WM_LBUTTONUP: if (LOWORD(lParam) > 16) { //clicked on today item text --- 143,148 ---- *************** *** 204,208 **** HDC hDC; HFONT hFontOld; - TCHAR szTextBuffer[MESSAGE_BUF]; COLORREF crText; --- 161,164 ---- *************** *** 273,278 **** // draw the item text rcMyBounds.left = rcMyBounds.left + 30; ! wsprintf(szTextBuffer, g_acMessage); ! DrawText(hDC, szTextBuffer, -1, &rcMyBounds, DT_LEFT); // Select the previous font back into the device context --- 229,233 ---- // draw the item text rcMyBounds.left = rcMyBounds.left + 30; ! DrawText(hDC, g_acMessage, -1, &rcMyBounds, DT_LEFT); // Select the previous font back into the device context *************** *** 284,291 **** break; - case WM_DESTROY : - WebAgent::shutdown(); - return 0 ; - // this fills in the background with the today screen image case WM_ERASEBKGND: --- 239,242 ---- *************** *** 328,344 **** { INT wmId, wmEvent; - //COPYDATASTRUCT *pCD; switch (uimessage) { case WM_CREATE: SetTimer(hWnd, ID_TIMER_UPDATE, UPDATE_INTERVAL_MS, NULL); break; case WM_TIMER: ! //TODO doScan(hWnd); break; case WM_DESTROY: KillTimer(hWnd, ID_TIMER_UPDATE); break; --- 279,304 ---- { INT wmId, wmEvent; switch (uimessage) { case WM_CREATE: + doScan(hWnd); SetTimer(hWnd, ID_TIMER_UPDATE, UPDATE_INTERVAL_MS, NULL); + + // when the program is started, check if any new subscriptions + // have been added while the program was closed. + { + SubscriptionAgent *pSA = SubscriptionAgent::instance(); + pSA->checkNew(g_hInst2, hWnd); + } + break; case WM_TIMER: ! doScan(hWnd); break; case WM_DESTROY: KillTimer(hWnd, ID_TIMER_UPDATE); + WebAgent::shutdown(); break; *************** *** 384,387 **** --- 344,391 ---- /*************************************************************************/ + /* Performs a location scan */ + /*************************************************************************/ + VOID doScan(HWND hWnd) + { + PTCHAR acMessage; + DWORD status = 0; + + + // if the device has just rebooted, don't scan yet + + if (GetTickCount() < 20000) { + wcscpy(g_acMessage, L"Searching for a wireless signal..."); + g_refreshNeeded = TRUE; + return; + } + + + // if the Location object hasn't been created yet, do so + + if (!g_Location) { + g_Location = new Location(g_hInst2); + WindowsUtils_SetNotificationWindow(hWnd); + } + + + g_Location->scan(); + g_Location->checkUploadNeeded(); + acMessage = g_Location->toString(&status); + + if (wcscmp(acMessage, g_acMessage)) { + wcscpy(g_acMessage, acMessage); + + g_iconId = IDI_SMALLICON; + if (status & APDB_LOOKUP_NOTFOUND) g_iconId = IDI_STATUS_UNKNOWN; + else if (status & APDB_LOOKUP_BUSY) g_iconId = IDI_STATUS_BUSY; + else if (status & APDB_LOOKUP_ERROR) g_iconId = IDI_STATUS_ERROR; + + g_refreshNeeded = TRUE; + + } + } + + + /*************************************************************************/ /* Create and register our window class for the today item */ /*************************************************************************/ *************** *** 426,429 **** --- 430,448 ---- } + + // create "dummy" window at the top level to receive messages from + // other applications + g_hWndDummy = CreateWindow(TEXT("Herecast"), TEXT("Herecast"), 0, + CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, g_hInst2, NULL); + + if (!g_hWndDummy) { + return NULL; + } + + ShowWindow(g_hWndDummy, SW_HIDE); //this window is never actually shown + UpdateWindow(g_hWndDummy); + + + // create the main today item window LPCTSTR className = TEXT("dlgHerecastTodayItemClass"); //LPCTSTR className=(LPCTSTR)LoadString(g_hInst2,IDS_TODAY_WINDOWCLASS,0,0); *************** *** 434,437 **** --- 453,463 ---- CW_USEDEFAULT,CW_USEDEFAULT,240,0,hwndParent, NULL, g_hInst2, NULL) ; + // if the second window didn't work, destroy both and return + if (!g_hWnd) { + DestroyWindow(g_hWndDummy); + g_hWndDummy = NULL; + return NULL; + } + // attach our winproc to the newly created window SetWindowLong(g_hWnd, GWL_WNDPROC, (LONG) WndProc); *************** *** 441,460 **** UpdateWindow (g_hWnd) ; - - // create a second "dummy" window at the top level to receive messages - // from other applications - g_hWndDummy = CreateWindow(TEXT("Herecast"), TEXT("Herecast"), 0, - CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, g_hInst2, NULL); - - if (!g_hWndDummy) { - DestroyWindow(g_hWnd); - g_hWnd = NULL; - return NULL; - } - - ShowWindow(g_hWndDummy, SW_HIDE); //this window is never actually shown - UpdateWindow(g_hWndDummy); - - return g_hWnd; } --- 467,470 ---- |
|
From: Mark P. <mdp...@us...> - 2005-07-24 19:34:29
|
Update of /cvsroot/herecast/herecast/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29530/src Modified Files: Herecast.vco changelog.txt Log Message: moved important parts to a new doScan function and the dummy window (more like the XP version); re-arranged some stuff and deleted unused variables Index: changelog.txt =================================================================== RCS file: /cvsroot/herecast/herecast/src/changelog.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** changelog.txt 14 Dec 2004 07:35:11 -0000 1.17 --- changelog.txt 24 Jul 2005 19:34:20 -0000 1.18 *************** *** 1,2 **** --- 1,10 ---- + Version 1.06 - in progress + + - Today item and subscriptions are now updated even + - On startup, the new subscription dialog won't pop up until a location fix + has been established. + - Added an API that allows other applications to get information from + Herecast. See the new HerecastTester project for an example. + Beta 5 - December 14, 2004 Index: Herecast.vco =================================================================== RCS file: /cvsroot/herecast/herecast/src/Herecast.vco,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 Binary files /tmp/cvszBFlXt and /tmp/cvsof8Y7L differ |
|
From: Mark P. <mdp...@us...> - 2005-07-24 18:22:02
|
Update of /cvsroot/herecast/herecast/src/TodayItem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14378/src/TodayItem Modified Files: whereami.cpp Log Message: adjusting InitializeCustomItem so it conforms to the requirements listed on MSDN Index: whereami.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/TodayItem/whereami.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** whereami.cpp 21 Jul 2005 19:52:43 -0000 1.7 --- whereami.cpp 24 Jul 2005 18:21:54 -0000 1.8 *************** *** 421,424 **** --- 421,429 ---- HWND InitializeCustomItem(TODAYLISTITEM *ptli, HWND hwndParent) { + // docs say to do this (we didn't for the longest time) + if (!ptli->fEnabled) { + return NULL; + } + LPCTSTR className = TEXT("dlgHerecastTodayItemClass"); //LPCTSTR className=(LPCTSTR)LoadString(g_hInst2,IDS_TODAY_WINDOWCLASS,0,0); *************** *** 442,445 **** --- 447,456 ---- CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, g_hInst2, NULL); + if (!g_hWndDummy) { + DestroyWindow(g_hWnd); + g_hWnd = NULL; + return NULL; + } + ShowWindow(g_hWndDummy, SW_HIDE); //this window is never actually shown UpdateWindow(g_hWndDummy); |
|
From: Mark P. <mdp...@us...> - 2005-07-21 20:57:40
|
Update of /cvsroot/herecast/herecast/src/HerecastLib/APDB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18388/src/HerecastLib/APDB Modified Files: Location.cpp Location.h Log Message: added a SendMessage API, so third party applications can retrieve info from Herecast. This change included storing the most recent Ap* in the class itself, instead of as a static variable within the lookup method. Index: Location.h =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastLib/APDB/Location.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Location.h 14 Dec 2004 06:36:41 -0000 1.3 --- Location.h 21 Jul 2005 19:56:32 -0000 1.4 *************** *** 18,24 **** --- 18,26 ---- WiFi *pWiFi; AccessPoint* pClosestAccessPoint; + Ap* pClosestAp; int nNextActiveScan; int lookup(TCHAR* atcLocationBuf, TCHAR* atcBuildingBuf); + int ApiReturnString(string str, HWND hWnd, HWND hWndDest); public: *************** *** 29,33 **** void click(); TCHAR* toString(DWORD *pnStatus = NULL, BOOL *pIsReliable = NULL); ! friend void location_bssidCallback(PNDIS_WLAN_BSSID pBSSID, void* data); --- 31,36 ---- void click(); TCHAR* toString(DWORD *pnStatus = NULL, BOOL *pIsReliable = NULL); ! int execAPIMsg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); ! friend void location_bssidCallback(PNDIS_WLAN_BSSID pBSSID, void* data); Index: Location.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastLib/APDB/Location.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Location.cpp 14 Dec 2004 07:35:09 -0000 1.8 --- Location.cpp 21 Jul 2005 19:56:32 -0000 1.9 *************** *** 22,25 **** --- 22,26 ---- #include "../LibMain/stdafx.h" #include "../LibMain/resource.h" + #include "../LibMain/herecast.h" #include "Location.h" #include "apdb.h" *************** *** 71,74 **** --- 72,76 ---- this->pClosestAccessPoint = NULL; + this->pClosestAp = NULL; this->hInst = hInstance; this->nNextActiveScan = TODAYITEM_ACTIVESCAN_INTERVAL; *************** *** 124,129 **** int Location::lookup(TCHAR* atcLocationBuf, TCHAR* atcBuildingBuf) { - static Ap* pClosestAp = NULL; - UCHAR *oMacAddress = pClosestAccessPoint->getMacAddr(); --- 126,129 ---- *************** *** 295,296 **** --- 295,375 ---- pAPDB->checkUploadNeeded(); } + + + int Location::execAPIMsg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) + { + HWND hWndDest = (HWND) wParam; + COPYDATASTRUCT *pCD; + + if (!pClosestAp) { + return 0; + } + + switch (msg) { + case WM_COPYDATA: + pCD = (COPYDATASTRUCT*) lParam; + if (pCD->dwData == HC_PARSE_URL) { + string result = ""; + + int size = WideCharToMultiByte(CP_ACP, 0, (WCHAR*)pCD->lpData, -1, NULL, 0, 0, 0); + + char* lpBuffer = new char[size]; + + if (WideCharToMultiByte(CP_ACP, 0, (WCHAR*)pCD->lpData, -1, lpBuffer, size, 0, 0)) { + result = pClosestAp->parseUrl(lpBuffer); + } + + delete [] lpBuffer; + + return ApiReturnString(result, hWnd, hWndDest); + } + return 0; + + case HC_GET_BSSID: return ApiReturnString(pClosestAp->getBssid().toHexString(), hWnd, hWndDest); + case HC_GET_LOCATION: return ApiReturnString(pClosestAp->getLocation(), hWnd, hWndDest); + case HC_GET_FLOOR: return ApiReturnString(pClosestAp->getFloor(), hWnd, hWndDest); + case HC_GET_FLOOR2: return ApiReturnString(pClosestAp->getFloorDecorated(), hWnd, hWndDest); + case HC_GET_BUILDING: return ApiReturnString(pClosestAp->getBuilding(), hWnd, hWndDest); + case HC_GET_STREETADDR:return ApiReturnString(pClosestAp->getStreetaddr(), hWnd, hWndDest); + case HC_GET_AREA: return ApiReturnString(pClosestAp->getArea(), hWnd, hWndDest); + case HC_GET_CITY: return ApiReturnString(pClosestAp->getCity(), hWnd, hWndDest); + case HC_GET_PROVINCE: return ApiReturnString(pClosestAp->getProvince(), hWnd, hWndDest); + case HC_GET_COUNTRY: return ApiReturnString(pClosestAp->getCountry(), hWnd, hWndDest); + case HC_GET_NETWORK: return ApiReturnString(pClosestAp->getNetwork(), hWnd, hWndDest); + + case HC_GET_BUILDINGID:return pClosestAp->getBuildingId(); + case HC_GET_AREAID: return pClosestAp->getAreaId(); + case HC_GET_CITYID: return pClosestAp->getCityId(); + case HC_GET_PROVINCEID:return pClosestAp->getProvinceId(); + case HC_GET_COUNTRYID: return pClosestAp->getCountryId(); + case HC_GET_NETWORKID: return pClosestAp->getNetworkId(); + + } + + return 0; + } + + + int Location::ApiReturnString(string str, HWND hWnd, HWND hWndDest) + { + int result = 0; + + + // Convert the buffer from ASCII to Unicode. + int size = MultiByteToWideChar(CP_ACP, 0, str.c_str(), -1, NULL, 0); + + WCHAR *lpBufferW = new WCHAR[size]; + + if (MultiByteToWideChar(CP_ACP, 0, str.c_str(), -1, lpBufferW, size)) { + COPYDATASTRUCT cd; + cd.dwData = 0; + cd.cbData = size * sizeof(WCHAR); + cd.lpData = lpBufferW; + + result = SendMessage(hWndDest, WM_COPYDATA, (WPARAM)hWnd, (LPARAM)&cd); + } + + delete [] lpBufferW; + + return result; + } |
|
From: Mark P. <mdp...@us...> - 2005-07-21 20:07:14
|
Update of /cvsroot/herecast/herecast/src/HerecastTester In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21545/src/HerecastTester Modified Files: HerecastAPI.cpp HerecastAPI.h HerecastTester.cpp ReadMe.txt herecast.h Log Message: HerecastTester code is public domain, so it can more easily be adapted for use by other applications Index: HerecastTester.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastTester/HerecastTester.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HerecastTester.cpp 21 Jul 2005 19:44:01 -0000 1.1 --- HerecastTester.cpp 21 Jul 2005 20:07:03 -0000 1.2 *************** *** 1,2 **** --- 1,7 ---- + /** + * HerecastTester + * The code in this file is public domain. + */ + #include "stdafx.h" #include "HerecastAPI.h" Index: herecast.h =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastTester/herecast.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** herecast.h 21 Jul 2005 19:44:01 -0000 1.1 --- herecast.h 21 Jul 2005 20:07:03 -0000 1.2 *************** *** 1,27 **** /* API Version 1.0 Compatible with Herecast 1.06 and later ! Sample usage: ! ! ! void HerecastTest() ! { ! HWND hwnd = FindWindow(TEXT("Herecast"), NULL); ! if (!hwnd) { ! MessageBox(hwnd, TEXT("Herecast not running"), TEXT("Error"), 0); ! return; ! } ! ! WCHAR buf[HC_FIELDSIZE]; ! ! LRESULT result = SendMessage(hwnd, HC_GET_BSSID, buf, HC_FIELDSIZE); ! if (!result) { ! MessageBox(hwnd, TEXT("No answer from Herecast"), TEXT("Error"), 0); ! return; ! } ! ! MessageBox(hwnd, buf, TEXT("BSSID"), 0); ! } ! */ --- 1,7 ---- /* API Version 1.0 Compatible with Herecast 1.06 and later + The code in this file is public domain. ! For sample usage, see the HerecastAPI project. */ Index: HerecastAPI.h =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastTester/HerecastAPI.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HerecastAPI.h 21 Jul 2005 19:44:00 -0000 1.1 --- HerecastAPI.h 21 Jul 2005 20:07:03 -0000 1.2 *************** *** 1,6 **** ! #ifndef __HERECASTAPI_H ! #define __HERECASTAPI_H ! /* Here's all you need to do to use this interface: --- 1,6 ---- ! /** ! HerecastAPI: A simple interface to communicate with Herecast ! (The code in this file is public domain.) Here's all you need to do to use this interface: Index: ReadMe.txt =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastTester/ReadMe.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReadMe.txt 21 Jul 2005 19:44:01 -0000 1.1 --- ReadMe.txt 21 Jul 2005 20:07:03 -0000 1.2 *************** *** 9,10 **** --- 9,14 ---- An interface that simplifies access to the Herecast API. You can either use this as is, or view the code to see how the API itself works. + + + While Herecast itself is GPL, the sample code included in HerecastTester + and HerecastAPI is public domain. Index: HerecastAPI.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastTester/HerecastAPI.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HerecastAPI.cpp 21 Jul 2005 19:44:00 -0000 1.1 --- HerecastAPI.cpp 21 Jul 2005 20:07:03 -0000 1.2 *************** *** 1,2 **** --- 1,7 ---- + /** + * HerecastAPI + * The code in this file is public domain. + */ + #include "stdafx.h" #include "HerecastAPI.h" |
|
From: Mark P. <mdp...@us...> - 2005-07-21 20:07:14
|
Update of /cvsroot/herecast/herecast/src/HerecastLib/LibMain In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21545/src/HerecastLib/LibMain Modified Files: herecast.h Log Message: HerecastTester code is public domain, so it can more easily be adapted for use by other applications Index: herecast.h =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastLib/LibMain/herecast.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** herecast.h 21 Jul 2005 19:56:32 -0000 1.1 --- herecast.h 21 Jul 2005 20:07:03 -0000 1.2 *************** *** 1,27 **** /* API Version 1.0 Compatible with Herecast 1.06 and later ! Sample usage: ! ! ! void HerecastTest() ! { ! HWND hwnd = FindWindow(TEXT("Herecast"), NULL); ! if (!hwnd) { ! MessageBox(hwnd, TEXT("Herecast not running"), TEXT("Error"), 0); ! return; ! } ! ! WCHAR buf[HC_FIELDSIZE]; ! ! LRESULT result = SendMessage(hwnd, HC_GET_BSSID, buf, HC_FIELDSIZE); ! if (!result) { ! MessageBox(hwnd, TEXT("No answer from Herecast"), TEXT("Error"), 0); ! return; ! } ! ! MessageBox(hwnd, buf, TEXT("BSSID"), 0); ! } ! */ --- 1,7 ---- /* API Version 1.0 Compatible with Herecast 1.06 and later + The code in this file is public domain. ! For sample usage, see the HerecastAPI project. */ |
|
From: Mark P. <mdp...@us...> - 2005-07-21 20:03:31
|
Update of /cvsroot/herecast/herecast/src/HerecastTester In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15137/src/HerecastTester Added Files: HerecastAPI.cpp HerecastAPI.h HerecastTester.cpp HerecastTester.rc HerecastTester.vcp ReadMe.txt StdAfx.cpp StdAfx.h herecast.h newres.h resource.h Log Message: added HerecastTester project, initially just for testing the API --- NEW FILE: HerecastTester.vcp --- # Microsoft eMbedded Visual Tools Project File - Name="HerecastTester" - Package Owner=<4> # Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02 # ** DO NOT EDIT ** # TARGTYPE "Win32 (WCE ARMV4) Application" 0xa301 # TARGTYPE "Win32 (WCE emulator) Application" 0xa601 CFG=HerecastTester - Win32 (WCE emulator) Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "HerecastTester.vcn". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "HerecastTester.vcn" CFG="HerecastTester - Win32 (WCE emulator) Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "HerecastTester - Win32 (WCE emulator) Release" (based on "Win32 (WCE emulator) Application") !MESSAGE "HerecastTester - Win32 (WCE emulator) Debug" (based on "Win32 (WCE emulator) Application") !MESSAGE "HerecastTester - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Application") !MESSAGE "HerecastTester - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" # PROP ATL_Project 2 !IF "$(CFG)" == "HerecastTester - Win32 (WCE emulator) Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "emulatorRel" # PROP BASE Intermediate_Dir "emulatorRel" # PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}" # PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "emulatorRel" # PROP Intermediate_Dir "emulatorRel" # PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}" # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Target_Dir "" RSC=rc.exe # ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r CPP=cl.exe # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /Yu"stdafx.h" /Gs8192 /GF /O2 /c # ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /Yu"stdafx.h" /Gs8192 /GF /O2 /c MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86 # ADD LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86 !ELSEIF "$(CFG)" == "HerecastTester - Win32 (WCE emulator) Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "emulatorDbg" # PROP BASE Intermediate_Dir "emulatorDbg" # PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}" # PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "emulatorDbg" # PROP Intermediate_Dir "emulatorDbg" # PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}" # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Target_Dir "" RSC=rc.exe # ADD BASE RSC /l 0x409 /d "$(CePlatform)" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "_X86_" /d "x86" /d "_i386_" /r # ADD RSC /l 0x409 /d "$(CePlatform)" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "_X86_" /d "x86" /d "_i386_" /r CPP=cl.exe # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "_i386_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /Yu"stdafx.h" /Gs8192 /GF /c # ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "_i386_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /Yu"stdafx.h" /Gs8192 /GF /c MTL=midl.exe # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86 # ADD LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86 !ELSEIF "$(CFG)" == "HerecastTester - Win32 (WCE ARMV4) Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "ARMV4Rel" # PROP BASE Intermediate_Dir "ARMV4Rel" # PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}" # PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "ARMV4Rel" # PROP Intermediate_Dir "ARMV4Rel" # PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}" # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Target_Dir "" RSC=rc.exe # ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "NDEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "NDEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r CPP=clarm.exe # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /O2 /M$(CECrtMT) /c # ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /O2 /M$(CECrtMT) /c MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM # ADD LINK32 commctrl.lib coredll.lib aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM !ELSEIF "$(CFG)" == "HerecastTester - Win32 (WCE ARMV4) Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "ARMV4Dbg" # PROP BASE Intermediate_Dir "ARMV4Dbg" # PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}" # PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "ARMV4Dbg" # PROP Intermediate_Dir "ARMV4Dbg" # PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}" # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Target_Dir "" RSC=rc.exe # ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "DEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "DEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r CPP=clarm.exe # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /M$(CECrtMTDebug) /c # ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /FR /Yu"stdafx.h" /M$(CECrtMTDebug) /c MTL=midl.exe # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM # ADD LINK32 commctrl.lib coredll.lib aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM !ENDIF # Begin Target # Name "HerecastTester - Win32 (WCE emulator) Release" # Name "HerecastTester - Win32 (WCE emulator) Debug" # Name "HerecastTester - Win32 (WCE ARMV4) Release" # Name "HerecastTester - Win32 (WCE ARMV4) Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=.\HerecastAPI.cpp !IF "$(CFG)" == "HerecastTester - Win32 (WCE emulator) Release" DEP_CPP_HEREC=\ ".\HerecastAPI.h"\ ".\StdAfx.h"\ !ELSEIF "$(CFG)" == "HerecastTester - Win32 (WCE emulator) Debug" DEP_CPP_HEREC=\ ".\HerecastAPI.h"\ ".\StdAfx.h"\ !ELSEIF "$(CFG)" == "HerecastTester - Win32 (WCE ARMV4) Release" DEP_CPP_HEREC=\ ".\HerecastAPI.h"\ ".\StdAfx.h"\ !ELSEIF "$(CFG)" == "HerecastTester - Win32 (WCE ARMV4) Debug" DEP_CPP_HEREC=\ ".\herecast.h"\ ".\HerecastAPI.h"\ ".\StdAfx.h"\ !ENDIF # End Source File # Begin Source File SOURCE=.\HerecastTester.cpp !IF "$(CFG)" == "HerecastTester - Win32 (WCE emulator) Release" DEP_CPP_HERECA=\ ".\StdAfx.h"\ !ELSEIF "$(CFG)" == "HerecastTester - Win32 (WCE emulator) Debug" DEP_CPP_HERECA=\ ".\StdAfx.h"\ !ELSEIF "$(CFG)" == "HerecastTester - Win32 (WCE ARMV4) Release" DEP_CPP_HERECA=\ ".\StdAfx.h"\ !ELSEIF "$(CFG)" == "HerecastTester - Win32 (WCE ARMV4) Debug" DEP_CPP_HERECA=\ ".\herecast.h"\ ".\HerecastAPI.h"\ ".\StdAfx.h"\ !ENDIF # End Source File # Begin Source File SOURCE=.\HerecastTester.rc !IF "$(CFG)" == "HerecastTester - Win32 (WCE emulator) Release" !ELSEIF "$(CFG)" == "HerecastTester - Win32 (WCE emulator) Debug" !ELSEIF "$(CFG)" == "HerecastTester - Win32 (WCE ARMV4) Release" !ELSEIF "$(CFG)" == "HerecastTester - Win32 (WCE ARMV4) Debug" !ENDIF # End Source File # Begin Source File SOURCE=.\StdAfx.cpp !IF "$(CFG)" == "HerecastTester - Win32 (WCE emulator) Release" DEP_CPP_STDAF=\ ".\StdAfx.h"\ # ADD CPP /Yc"stdafx.h" !ELSEIF "$(CFG)" == "HerecastTester - Win32 (WCE emulator) Debug" DEP_CPP_STDAF=\ ".\StdAfx.h"\ # ADD CPP /Yc"stdafx.h" !ELSEIF "$(CFG)" == "HerecastTester - Win32 (WCE ARMV4) Release" DEP_CPP_STDAF=\ ".\StdAfx.h"\ # ADD CPP /Yc"stdafx.h" !ELSEIF "$(CFG)" == "HerecastTester - Win32 (WCE ARMV4) Debug" DEP_CPP_STDAF=\ ".\StdAfx.h"\ # ADD CPP /Yc"stdafx.h" !ENDIF # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=.\HerecastAPI.h # End Source File # Begin Source File SOURCE=.\newres.h # End Source File # Begin Source File SOURCE=.\resource.h # End Source File # Begin Source File SOURCE=.\StdAfx.h # End Source File # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # Begin Source File SOURCE=.\ReadMe.txt # End Source File # End Target # End Project --- NEW FILE: newres.h --- #ifndef __NEWRES_H__ #define __NEWRES_H__ #if !defined(UNDER_CE) #define UNDER_CE _WIN32_WCE #endif #if defined(_WIN32_WCE) #if !defined(WCEOLE_ENABLE_DIALOGEX) #define DIALOGEX DIALOG DISCARDABLE #endif #include <commctrl.h> #define SHMENUBAR RCDATA #if defined(WIN32_PLATFORM_PSPC) && (_WIN32_WCE >= 300) #include <aygshell.h> #define AFXCE_IDR_SCRATCH_SHMENU 28700 #else #define I_IMAGENONE (-2) #define NOMENU 0xFFFF #define IDS_SHNEW 1 #define IDM_SHAREDNEW 10 #define IDM_SHAREDNEWDEFAULT 11 #endif // _WIN32_WCE_PSPC #define AFXCE_IDD_SAVEMODIFIEDDLG 28701 #endif // _WIN32_WCE #ifdef RC_INVOKED #ifndef _INC_WINDOWS #define _INC_WINDOWS #include "winuser.h" // extract from windows header #include "winver.h" #endif #endif #ifdef IDC_STATIC #undef IDC_STATIC #endif #define IDC_STATIC (-1) #endif //__NEWRES_H__ --- NEW FILE: resource.h --- //{{NO_DEPENDENCIES}} // Microsoft eMbedded Visual C++ generated include file. // Used by HERECASTTESTER.RC // --- NEW FILE: HerecastTester.cpp --- #include "stdafx.h" #include "HerecastAPI.h" // globals HerecastAPI g_herecast; // forward declarations INT InitilizeClasses(HINSTANCE hInstance); HWND CreateMyWindow(HINSTANCE hInstance); LRESULT CALLBACK WndProc(HWND hWnd, UINT uimessage, WPARAM wParam, LPARAM lParam) ; int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { InitilizeClasses(hInstance); CreateMyWindow(hInstance); // Example of checking to see if Herecast is running if (!g_herecast.findHerecast()) { MessageBox(0, TEXT("Herecast is not running"), TEXT("Error"), 0); return 1; } // Example of getting an integer (City ID) int id = g_herecast.getCityID(); if (id) { WCHAR strResult[256]; wsprintf(strResult, L"City ID: %i", id); MessageBox(0, strResult, L"Get an ID", 0); } else { MessageBox(0, TEXT("City is unknown"), TEXT("Error"), 0); } // Example of getting a string (City) WCHAR *result = g_herecast.getCity(); if (result) { MessageBox(0, result, L"Get a String", 0); } else { MessageBox(0, TEXT("City is unknown"), TEXT("Error"), 0); } // Example of parsing a URL (could be any string, really) result = g_herecast.parseURL(L"building={building},bssid={bssid}"); if (result) { MessageBox(0, result, L"Parse a URL", 0); } else { MessageBox(0, TEXT("No answer from Herecast"), TEXT("Error"), 0); } return 0; } // These next functions set up our dummy window, which is necessary to receive // strings. INT InitilizeClasses(HINSTANCE hInstance) { WNDCLASS wc; memset(&wc, 0, sizeof(wc)); wc.style = 0; wc.lpfnWndProc = (WNDPROC) WndProc; wc.hInstance = hInstance; wc.hIcon = 0; wc.hCursor = 0; wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wc.lpszClassName = TEXT("HerecastTester"); return RegisterClass(&wc); } HWND CreateMyWindow(HINSTANCE hInstance) { HWND hWnd = CreateWindow(TEXT("HerecastTester"), TEXT("HerecastTester"), 0, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL); ShowWindow(hWnd, SW_HIDE); //this window is never actually shown UpdateWindow(hWnd); return hWnd; } LRESULT CALLBACK WndProc(HWND hWnd, UINT uimessage, WPARAM wParam, LPARAM lParam) { switch (uimessage) { case WM_CREATE: g_herecast.setMyHWND(hWnd); return 0; case WM_COPYDATA: return g_herecast.My_WM_COPYDATA(hWnd, uimessage, wParam, lParam); } return DefWindowProc(hWnd, uimessage, wParam, lParam) ; } --- NEW FILE: herecast.h --- /* API Version 1.0 Compatible with Herecast 1.06 and later Sample usage: void HerecastTest() { HWND hwnd = FindWindow(TEXT("Herecast"), NULL); if (!hwnd) { MessageBox(hwnd, TEXT("Herecast not running"), TEXT("Error"), 0); return; } WCHAR buf[HC_FIELDSIZE]; LRESULT result = SendMessage(hwnd, HC_GET_BSSID, buf, HC_FIELDSIZE); if (!result) { MessageBox(hwnd, TEXT("No answer from Herecast"), TEXT("Error"), 0); return; } MessageBox(hwnd, buf, TEXT("BSSID"), 0); } */ #ifndef __HERECAST_H #define __HERECAST_H #define HC_FIELDSIZE 32 // including null termination #define HC_PARSE_URL WM_APP+0 #define HC_GET_BSSID WM_APP+1 #define HC_GET_LOCATION WM_APP+2 #define HC_GET_FLOOR WM_APP+3 #define HC_GET_FLOOR2 WM_APP+4 #define HC_GET_BUILDING WM_APP+5 #define HC_GET_BUILDINGID WM_APP+6 #define HC_GET_STREETADDR WM_APP+7 #define HC_GET_AREA WM_APP+8 #define HC_GET_AREAID WM_APP+9 #define HC_GET_CITY WM_APP+10 #define HC_GET_CITYID WM_APP+11 #define HC_GET_PROVINCE WM_APP+12 #define HC_GET_PROVINCEID WM_APP+13 #define HC_GET_COUNTRY WM_APP+14 #define HC_GET_COUNTRYID WM_APP+15 #define HC_GET_NETWORK WM_APP+16 #define HC_GET_NETWORKID WM_APP+17 #endif --- NEW FILE: ReadMe.txt --- HerecastTester.cpp The main test program. It demonstrates how to access the Herecast API using the HerecastAPI interface object. HerecastAPI An interface that simplifies access to the Herecast API. You can either use this as is, or view the code to see how the API itself works. --- NEW FILE: HerecastAPI.cpp --- #include "stdafx.h" #include "HerecastAPI.h" HerecastAPI::HerecastAPI() { lastString = NULL; hwndHerecast = NULL; hwndSelf = NULL; } HerecastAPI::~HerecastAPI() { free(lastString); lastString = NULL; } LRESULT CALLBACK HerecastAPI::My_WM_COPYDATA(HWND hWnd, UINT uimessage, WPARAM wParam, LPARAM lParam) { COPYDATASTRUCT *pCD = (COPYDATASTRUCT*) lParam; free(lastString); lastString = _wcsdup((WCHAR*)pCD->lpData); return 1; } HWND HerecastAPI::findHerecast() { hwndHerecast = FindWindow(TEXT("Herecast"), NULL); return hwndHerecast; } unsigned long HerecastAPI::getInt(int msg) { findHerecast(); return SendMessage(hwndHerecast, msg, 0, 0); } WCHAR* HerecastAPI::getString(int msg) { findHerecast(); LRESULT result = SendMessage(hwndHerecast, msg, (WPARAM)hwndSelf, 0); return result ? lastString : NULL; } WCHAR* HerecastAPI::parseURL(WCHAR *url) { findHerecast(); COPYDATASTRUCT cd; cd.dwData = HC_PARSE_URL; cd.cbData = wcslen(url) * sizeof(WCHAR); cd.lpData = url; if (SendMessage(hwndHerecast, WM_COPYDATA, (WPARAM)hwndSelf, (LPARAM)&cd)) { return lastString; } return NULL; } --- NEW FILE: StdAfx.h --- // stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #if !defined(AFX_STDAFX_H__DD5C74D5_65D8_4EAF_86B3_C0A648BF9C32__INCLUDED_) #define AFX_STDAFX_H__DD5C74D5_65D8_4EAF_86B3_C0A648BF9C32__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #if (_WIN32_WCE <= 211) #error This project can not be built for H/PC Pro 2.11 or earlier platforms. #endif #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers // Windows Header Files: #include <windows.h> // Local Header Files // TODO: reference additional headers your program requires here //{{AFX_INSERT_LOCATION}} // Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_STDAFX_H__DD5C74D5_65D8_4EAF_86B3_C0A648BF9C32__INCLUDED_) --- NEW FILE: StdAfx.cpp --- // stdafx.cpp : source file that includes just the standard includes // HerecastTester.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file --- NEW FILE: HerecastTester.rc --- //Microsoft eMbedded Visual C++ generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "newres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE DISCARDABLE BEGIN "resource.h\0" END 2 TEXTINCLUDE DISCARDABLE BEGIN "#include ""newres.h""\r\n" "\0" END 3 TEXTINCLUDE DISCARDABLE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED #endif ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED --- NEW FILE: HerecastAPI.h --- #ifndef __HERECASTAPI_H #define __HERECASTAPI_H /* Here's all you need to do to use this interface: 1. Your main WndProc needs to forward WM_COPYDATA messages to this interface. You can do this like so: case WM_COPYDATA: return herecast.My_WM_COPYDATA(hWnd, msg, wParam, lParam); 2. You need to call setMyHWND(). One good place to do this would be in WM_CREATE of the same WndProc. 3. Call findHerecast(), the get* methods, or parseURL() as you wish. These are all pretty self-explanatory. See HerecastTester.cpp for examples. If all you want to use is findHerecast and the get*ID methods, you can actually skip steps 1 and 2. */ #include "herecast.h" class HerecastAPI { private: HWND hwndSelf; // HWND to our own window (needed for parseURL) HWND hwndHerecast; // HWND of the Herecast window WCHAR* lastString; // last string received via WM_COPYDATA unsigned long getInt(int msg); // get an integer from Herecast WCHAR* getString(int msg); // get a string from Herecast public: HerecastAPI(); ~HerecastAPI(); void setMyHWND(HWND hWnd) { hwndSelf = hWnd; } LRESULT CALLBACK My_WM_COPYDATA(HWND hWnd, UINT uimessage, WPARAM wParam, LPARAM lParam); // findHerecast returns NULL if Herecast isn't running HWND findHerecast(); // the get*ID methods return the unique ID associated with the current // building/area/etc. If the object is not in the database, or if // Herecast isn't running, 0 is returned. unsigned long getBuildingID() { return getInt(HC_GET_BUILDINGID); } unsigned long getAreaID() { return getInt(HC_GET_AREAID); } unsigned long getCityID() { return getInt(HC_GET_CITYID); } unsigned long getProvinceID() { return getInt(HC_GET_PROVINCEID); } unsigned long getCountryID() { return getInt(HC_GET_COUNTRYID); } unsigned long getNetworkID() { return getInt(HC_GET_NETWORKID); } // the remaining methods return the human-understandable names of the // current building/city/etc. NULL is returned if Herecast isn't // running or the location isn't in the database. WCHAR* getBssid() { return getString(HC_GET_BSSID); } WCHAR* getLocation() { return getString(HC_GET_LOCATION); } WCHAR* getFloor() { return getString(HC_GET_FLOOR); } // eg: 2 WCHAR* getFloor2() { return getString(HC_GET_FLOOR2); } // eg: 2nd floor WCHAR* getBuilding() { return getString(HC_GET_BUILDING); } WCHAR* getStreetaddr() { return getString(HC_GET_STREETADDR); } WCHAR* getCity() { return getString(HC_GET_CITY); } WCHAR* getArea() { return getString(HC_GET_AREA); } WCHAR* getProvince() { return getString(HC_GET_PROVINCE); } WCHAR* getCountry() { return getString(HC_GET_COUNTRY); } WCHAR* getNetwork() { return getString(HC_GET_NETWORK); } // parses a subscription URL (or any string) containing fields such as // {building}, {city}, etc. WCHAR* parseURL(WCHAR *url); }; #endif |
|
From: Mark P. <mdp...@us...> - 2005-07-21 20:01:21
|
Update of /cvsroot/herecast/herecast/src/HerecastXP In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19688/src/HerecastXP Modified Files: HerecastXP.cpp Log Message: replaced tabs with spaces so it looks the same in any text editor Index: HerecastXP.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastXP/HerecastXP.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** HerecastXP.cpp 14 Dec 2004 09:29:36 -0000 1.13 --- HerecastXP.cpp 21 Jul 2005 20:01:10 -0000 1.14 *************** *** 18,32 **** // Global Variables: ! HINSTANCE hInst; // current instance ! TCHAR szTitle[MAX_LOADSTRING]; // The title bar text ! TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name Location *g_Location; DWORD g_status; // Forward declarations of functions included in this code module: ! ATOM MyRegisterClass(HINSTANCE hInstance); ! BOOL InitInstance(HINSTANCE, int); ! LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); ! LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); VOID doScan(HWND hWnd); --- 18,32 ---- // Global Variables: ! HINSTANCE hInst; // current instance ! TCHAR szTitle[MAX_LOADSTRING]; // The title bar text ! TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name Location *g_Location; DWORD g_status; // Forward declarations of functions included in this code module: ! ATOM MyRegisterClass(HINSTANCE hInstance); ! BOOL InitInstance(HINSTANCE, int); ! LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); ! LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); VOID doScan(HWND hWnd); *************** *** 36,67 **** int nCmdShow) { ! // TODO: Place code here. ! MSG msg; ! HACCEL hAccelTable; // Initialize global strings ! LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); ! LoadString(hInstance, IDC_HERECAST, szWindowClass, MAX_LOADSTRING); ! MyRegisterClass(hInstance); ! // Perform application initialization: ! if (!InitInstance (hInstance, nCmdShow)) ! { ! return FALSE; ! } ! hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_HERECAST); ! // Main message loop: ! while (GetMessage(&msg, NULL, 0, 0)) ! { ! if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) ! { ! TranslateMessage(&msg); ! DispatchMessage(&msg); ! } ! } ! return (int) msg.wParam; } --- 36,67 ---- int nCmdShow) { ! // TODO: Place code here. ! MSG msg; ! HACCEL hAccelTable; // Initialize global strings ! LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); ! LoadString(hInstance, IDC_HERECAST, szWindowClass, MAX_LOADSTRING); ! MyRegisterClass(hInstance); ! // Perform application initialization: ! if (!InitInstance (hInstance, nCmdShow)) ! { ! return FALSE; ! } ! hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_HERECAST); ! // Main message loop: ! while (GetMessage(&msg, NULL, 0, 0)) ! { ! if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) ! { ! TranslateMessage(&msg); ! DispatchMessage(&msg); ! } ! } ! return (int) msg.wParam; } *************** *** 83,103 **** ATOM MyRegisterClass(HINSTANCE hInstance) { ! WNDCLASSEX wcex; ! wcex.cbSize = sizeof(WNDCLASSEX); ! wcex.style = CS_HREDRAW | CS_VREDRAW; ! wcex.lpfnWndProc = (WNDPROC)WndProc; ! wcex.cbClsExtra = 0; ! wcex.cbWndExtra = 0; ! wcex.hInstance = hInstance; ! wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_DISPLAYICON); ! wcex.hCursor = LoadCursor(NULL, IDC_ARROW); ! wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); ! wcex.lpszMenuName = 0; //(LPCTSTR)IDM_LOCATION; ! wcex.lpszClassName = szWindowClass; ! wcex.hIconSm = NULL; //it auto-selects the small icon ok ! return RegisterClassEx(&wcex); } --- 83,103 ---- ATOM MyRegisterClass(HINSTANCE hInstance) { ! WNDCLASSEX wcex; ! wcex.cbSize = sizeof(WNDCLASSEX); ! wcex.style = CS_HREDRAW | CS_VREDRAW; ! wcex.lpfnWndProc = (WNDPROC)WndProc; ! wcex.cbClsExtra = 0; ! wcex.cbWndExtra = 0; ! wcex.hInstance = hInstance; ! wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_DISPLAYICON); ! wcex.hCursor = LoadCursor(NULL, IDC_ARROW); ! wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); ! wcex.lpszMenuName = 0; //(LPCTSTR)IDM_LOCATION; ! wcex.lpszClassName = szWindowClass; ! wcex.hIconSm = NULL; //it auto-selects the small icon ok ! return RegisterClassEx(&wcex); } *************** *** 169,178 **** g_Location->scan(); g_Location->checkUploadNeeded(); ! PTCHAR acMessage; BOOL isReliable; acMessage = g_Location->toString(&g_status, &isReliable); ! if (wcscmp(acMessage, acPrevMessage)) { ! wcscpy(acPrevMessage, acMessage); WORD iconId = IDI_SMALLICON; --- 169,178 ---- g_Location->scan(); g_Location->checkUploadNeeded(); ! PTCHAR acMessage; BOOL isReliable; acMessage = g_Location->toString(&g_status, &isReliable); ! if (wcscmp(acMessage, acPrevMessage)) { ! wcscpy(acPrevMessage, acMessage); WORD iconId = IDI_SMALLICON; *************** *** 203,238 **** // PURPOSE: Processes messages for the main window. // ! // WM_COMMAND - process the application menu ! // WM_PAINT - Paint the main window ! // WM_DESTROY - post a quit message and return // // LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { ! int wmId, wmEvent; POINT lpClickPoint; HMENU hPopMenu; ! PAINTSTRUCT ps; ! HDC hdc; ! switch (message) ! { case WM_CREATE: SetTimer(hWnd, ID_TIMER_UPDATE, UPDATE_INTERVAL_MS, NULL); break; ! case WM_COMMAND: ! wmId = LOWORD(wParam); ! wmEvent = HIWORD(wParam); ! // Parse the menu selections: ! switch (wmId) ! { ! //case IDM_ABOUT: ! // DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About); ! // break; ! case IDM_LOCATION: g_Location->click(); break; ! case IDM_SCANNER: dlgScanner2_create(hInst, SW_SHOW); break; --- 203,238 ---- // PURPOSE: Processes messages for the main window. // ! // WM_COMMAND - process the application menu ! // WM_PAINT - Paint the main window ! // WM_DESTROY - post a quit message and return // // LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { ! int wmId, wmEvent; POINT lpClickPoint; HMENU hPopMenu; ! PAINTSTRUCT ps; ! HDC hdc; ! switch (message) ! { case WM_CREATE: SetTimer(hWnd, ID_TIMER_UPDATE, UPDATE_INTERVAL_MS, NULL); break; ! case WM_COMMAND: ! wmId = LOWORD(wParam); ! wmEvent = HIWORD(wParam); ! // Parse the menu selections: ! switch (wmId) ! { ! //case IDM_ABOUT: ! // DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About); ! // break; ! case IDM_LOCATION: g_Location->click(); break; ! case IDM_SCANNER: dlgScanner2_create(hInst, SW_SHOW); break; *************** *** 243,249 **** dlgOptions_create(hInst, hWnd); break; ! case IDM_EXIT: ! DestroyWindow(hWnd); ! break; case IDMSG_ADD_SUBSCRIPTION: { SubscriptionAgent *pSA = SubscriptionAgent::instance(); --- 243,249 ---- dlgOptions_create(hInst, hWnd); break; ! case IDM_EXIT: ! DestroyWindow(hWnd); ! break; case IDMSG_ADD_SUBSCRIPTION: { SubscriptionAgent *pSA = SubscriptionAgent::instance(); *************** *** 251,258 **** return TRUE; } ! default: ! return DefWindowProc(hWnd, message, wParam, lParam); ! } ! break; case WM_TIMER: --- 251,258 ---- return TRUE; } ! default: ! return DefWindowProc(hWnd, message, wParam, lParam); ! } ! break; case WM_TIMER: *************** *** 264,270 **** case WM_LBUTTONDOWN: // to open the GUI of the Application g_Location->click(); ! return TRUE; ! case WM_RBUTTONDOWN: WindowsUtils_ResetLastNotificationURL(); GetCursorPos(&lpClickPoint); --- 264,270 ---- case WM_LBUTTONDOWN: // to open the GUI of the Application g_Location->click(); ! return TRUE; ! case WM_RBUTTONDOWN: WindowsUtils_ResetLastNotificationURL(); GetCursorPos(&lpClickPoint); *************** *** 278,283 **** AppendMenu(hPopMenu,MF_SEPARATOR,0,TEXT("")); AppendMenu(hPopMenu,MF_STRING,IDM_EXIT,TEXT("E&xit")); ! ! //workaround for microsoft bug, to hide menu w/o selecting SetForegroundWindow(hWnd); TrackPopupMenu(hPopMenu,TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_BOTTOMALIGN,lpClickPoint.x, lpClickPoint.y,0,hWnd,NULL); --- 278,283 ---- AppendMenu(hPopMenu,MF_SEPARATOR,0,TEXT("")); AppendMenu(hPopMenu,MF_STRING,IDM_EXIT,TEXT("E&xit")); ! ! //workaround for microsoft bug, to hide menu w/o selecting SetForegroundWindow(hWnd); TrackPopupMenu(hPopMenu,TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_BOTTOMALIGN,lpClickPoint.x, lpClickPoint.y,0,hWnd,NULL); *************** *** 314,323 **** break; ! case WM_PAINT: ! hdc = BeginPaint(hWnd, &ps); ! EndPaint(hWnd, &ps); ! break; ! case WM_DESTROY: NOTIFYICONDATA nid; nid.cbSize = sizeof(NOTIFYICONDATA); --- 314,323 ---- break; ! case WM_PAINT: ! hdc = BeginPaint(hWnd, &ps); ! EndPaint(hWnd, &ps); ! break; ! case WM_DESTROY: NOTIFYICONDATA nid; nid.cbSize = sizeof(NOTIFYICONDATA); *************** *** 327,337 **** KillTimer(hWnd, ID_TIMER_UPDATE); ! PostQuitMessage(0); ! break; ! default: ! return DefWindowProc(hWnd, message, wParam, lParam); ! } ! return 0; } --- 327,337 ---- KillTimer(hWnd, ID_TIMER_UPDATE); ! PostQuitMessage(0); ! break; ! default: ! return DefWindowProc(hWnd, message, wParam, lParam); ! } ! return 0; } *************** *** 339,355 **** LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { ! switch (message) ! { ! case WM_INITDIALOG: ! return TRUE; ! case WM_COMMAND: ! if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) ! { ! EndDialog(hDlg, LOWORD(wParam)); ! return TRUE; ! } ! break; ! } ! return FALSE; } --- 339,355 ---- LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { ! switch (message) ! { ! case WM_INITDIALOG: ! return TRUE; ! case WM_COMMAND: ! if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) ! { ! EndDialog(hDlg, LOWORD(wParam)); ! return TRUE; ! } ! break; ! } ! return FALSE; } |
|
From: Mark P. <mdp...@us...> - 2005-07-21 19:57:38
|
Update of /cvsroot/herecast/herecast/src/TodayItem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17441/src/TodayItem Modified Files: whereami.cpp Log Message: the today item now creates a hidden top-level window with class name "Herecast", just like the XP version. This also supports the new API, and will own the update timer (also like the XP version) Index: whereami.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/TodayItem/whereami.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** whereami.cpp 24 Nov 2004 07:36:44 -0000 1.6 --- whereami.cpp 21 Jul 2005 19:52:43 -0000 1.7 *************** *** 33,39 **** --- 33,41 ---- #include "../HerecastLib/APDB/WebAgent.h" #include "../HerecastLib/Utils/WindowsUtils.h" + #include "../HerecastLib/LibMain/herecast.h" #define INVALID_HEIGHT 0xFFFFFFFF #define UPDATE_INTERVAL 5 // * 2 seconds? + #define UPDATE_INTERVAL_MS 10000 //applies to the new fake window //global variables *************** *** 41,44 **** --- 43,47 ---- UINT g_plugInHeight; HWND g_hWnd; + HWND g_hWndDummy; HINSTANCE g_hInst2; BOOL g_bFirstDisplay = TRUE; *************** *** 72,75 **** --- 75,79 ---- //initilize the application class, and set the global window handle UnregisterClass((LPCTSTR)LoadString(g_hInst2, IDS_TODAY_APPNAME,0,0), g_hInst2); + UnregisterClass(TEXT("Herecast"), g_hInst2); InitilizeClasses(); g_hWnd = 0; *************** *** 84,89 **** DestroyIcon(g_hIcon); ! UnregisterClass((LPCTSTR)LoadString(g_hInst2, IDS_TODAY_APPNAME,0,0), g_hInst2); g_hInst2 = NULL; break; --- 88,95 ---- DestroyIcon(g_hIcon); ! DestroyWindow(g_hWndDummy); ! UnregisterClass((LPCTSTR)LoadString(g_hInst2, IDS_TODAY_APPNAME,0,0), g_hInst2); + UnregisterClass(TEXT("Herecast"), g_hInst2); g_hInst2 = NULL; break; *************** *** 293,301 **** case WM_COMMAND: - if (LOWORD(wParam) == IDMSG_ADD_SUBSCRIPTION) { - SubscriptionAgent *pSA = SubscriptionAgent::instance(); - pSA->checkNew(g_hInst2, hwnd); - return TRUE; - } // ID 3 is used for WindowsUtils_Notification Dismiss button break; --- 299,302 ---- *************** *** 324,327 **** --- 325,386 ---- + LRESULT CALLBACK WndProc_dummy(HWND hWnd, UINT uimessage, WPARAM wParam, LPARAM lParam) + { + INT wmId, wmEvent; + //COPYDATASTRUCT *pCD; + + switch (uimessage) { + case WM_CREATE: + SetTimer(hWnd, ID_TIMER_UPDATE, UPDATE_INTERVAL_MS, NULL); + break; + + case WM_TIMER: + //TODO doScan(hWnd); + break; + + case WM_DESTROY: + KillTimer(hWnd, ID_TIMER_UPDATE); + break; + + case WM_COMMAND: + wmId = LOWORD(wParam); + wmEvent = HIWORD(wParam); + switch (wmId) { + case IDMSG_ADD_SUBSCRIPTION: { + SubscriptionAgent *pSA = SubscriptionAgent::instance(); + pSA->checkNew(g_hInst2, hWnd); + return TRUE; + } + } + break; + + case WM_COPYDATA: + case HC_PARSE_URL: + case HC_GET_BSSID: + case HC_GET_LOCATION: + case HC_GET_FLOOR: + case HC_GET_FLOOR2: + case HC_GET_BUILDING: + case HC_GET_STREETADDR: + case HC_GET_AREA: + case HC_GET_CITY: + case HC_GET_PROVINCE: + case HC_GET_COUNTRY: + case HC_GET_NETWORK: + + case HC_GET_BUILDINGID: + case HC_GET_AREAID: + case HC_GET_CITYID: + case HC_GET_PROVINCEID: + case HC_GET_COUNTRYID: + case HC_GET_NETWORKID: + return g_Location->execAPIMsg(hWnd, uimessage, wParam, lParam); + + } + + return DefWindowProc(hWnd, uimessage, wParam, lParam) ; + } + + /*************************************************************************/ /* Create and register our window class for the today item */ *************** *** 341,349 **** wc.lpszClassName = TEXT("dlgHerecastTodayItemClass"); //register our window if(!RegisterClass(&wc)) { return 0 ; } ! return 1; } --- 400,417 ---- wc.lpszClassName = TEXT("dlgHerecastTodayItemClass"); + //register our today item window + if(!RegisterClass(&wc)) { + return 0 ; + } + + // create another class for the "public" window, similar to the above + wc.lpfnWndProc = (WNDPROC) WndProc_dummy; + wc.lpszClassName = TEXT("Herecast"); + //register our window if(!RegisterClass(&wc)) { return 0 ; } ! return 1; } *************** *** 367,370 **** --- 435,448 ---- ShowWindow (g_hWnd, SW_SHOWNORMAL); UpdateWindow (g_hWnd) ; + + + // create a second "dummy" window at the top level to receive messages + // from other applications + g_hWndDummy = CreateWindow(TEXT("Herecast"), TEXT("Herecast"), 0, + CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, g_hInst2, NULL); + + ShowWindow(g_hWndDummy, SW_HIDE); //this window is never actually shown + UpdateWindow(g_hWndDummy); + return g_hWnd; |
|
From: Mark P. <mdp...@us...> - 2005-07-21 19:57:12
|
Update of /cvsroot/herecast/herecast/src/HerecastLib/LibMain In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18388/src/HerecastLib/LibMain Added Files: herecast.h Log Message: added a SendMessage API, so third party applications can retrieve info from Herecast. This change included storing the most recent Ap* in the class itself, instead of as a static variable within the lookup method. --- NEW FILE: herecast.h --- /* API Version 1.0 Compatible with Herecast 1.06 and later Sample usage: void HerecastTest() { HWND hwnd = FindWindow(TEXT("Herecast"), NULL); if (!hwnd) { MessageBox(hwnd, TEXT("Herecast not running"), TEXT("Error"), 0); return; } WCHAR buf[HC_FIELDSIZE]; LRESULT result = SendMessage(hwnd, HC_GET_BSSID, buf, HC_FIELDSIZE); if (!result) { MessageBox(hwnd, TEXT("No answer from Herecast"), TEXT("Error"), 0); return; } MessageBox(hwnd, buf, TEXT("BSSID"), 0); } */ #ifndef __HERECAST_H #define __HERECAST_H #define HC_FIELDSIZE 32 // including null termination #define HC_PARSE_URL WM_APP+0 #define HC_GET_BSSID WM_APP+1 #define HC_GET_LOCATION WM_APP+2 #define HC_GET_FLOOR WM_APP+3 #define HC_GET_FLOOR2 WM_APP+4 #define HC_GET_BUILDING WM_APP+5 #define HC_GET_BUILDINGID WM_APP+6 #define HC_GET_STREETADDR WM_APP+7 #define HC_GET_AREA WM_APP+8 #define HC_GET_AREAID WM_APP+9 #define HC_GET_CITY WM_APP+10 #define HC_GET_CITYID WM_APP+11 #define HC_GET_PROVINCE WM_APP+12 #define HC_GET_PROVINCEID WM_APP+13 #define HC_GET_COUNTRY WM_APP+14 #define HC_GET_COUNTRYID WM_APP+15 #define HC_GET_NETWORK WM_APP+16 #define HC_GET_NETWORKID WM_APP+17 #endif |
|
From: Mark P. <mdp...@us...> - 2005-07-21 19:56:46
|
Update of /cvsroot/herecast/herecast/src/Subscribe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17441/src/Subscribe Modified Files: subscribe.cpp Log Message: the today item now creates a hidden top-level window with class name "Herecast", just like the XP version. This also supports the new API, and will own the update timer (also like the XP version) Index: subscribe.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/Subscribe/subscribe.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** subscribe.cpp 24 Nov 2004 21:27:57 -0000 1.2 --- subscribe.cpp 21 Jul 2005 19:52:42 -0000 1.3 *************** *** 78,130 **** - HWND FindChildWindow(HWND hWnd, LPTSTR lpTargetClass) - { - TCHAR thisClass[64]; - HWND hChild = GetWindow(hWnd, GW_CHILD | GW_HWNDFIRST); - - // first check the immediate children - - while (hChild) { - GetClassName(hChild, thisClass, 64); - if (!wcscmp(thisClass, lpTargetClass)) { - return hChild; - } - hChild = GetWindow(hChild, GW_HWNDNEXT); - } - - - // if it's not one of the immediate children, recursively check each child - - HWND hChildResult; - hChild = GetWindow(hWnd, GW_CHILD | GW_HWNDFIRST); - while (hChild) { - hChildResult = FindChildWindow(hChild, lpTargetClass); - if (hChildResult) { - return hChildResult; - } - hChild = GetWindow(hChild, GW_HWNDNEXT); - } - - return NULL; - } - - void NotifyTodayItem() { ! // first, find the today screen ! ! HWND hWnd = FindWindow(TEXT("DesktopExplorerWindow"), NULL); ! if (!hWnd) { ! MessageBox(0, L"Internal error: Can't find the desktop.", L"Subscription Error", 0); ! return; ! } ! ! ! // try to find the today item window (a child of the today screen) ! hWnd = FindChildWindow(hWnd, TEXT("dlgHerecastTodayItemClass")); ! // if the today item was found, send it a message if (hWnd) { --- 78,89 ---- void NotifyTodayItem() { ! // find the Herecast window ! HWND hWnd = FindWindow(TEXT("Herecast"), NULL); ! // if it was found, send it a message if (hWnd) { |
|
From: Mark P. <mdp...@us...> - 2005-07-21 19:53:54
|
Update of /cvsroot/herecast/herecast/src/HerecastLib/LibMain In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17659/src/HerecastLib/LibMain Modified Files: HerecastLib.vcp Log Message: the today item now creates a hidden top-level window with class name "Herecast", just like the XP version. This also supports the new API, and will own the update timer (also like the XP version) Index: HerecastLib.vcp =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastLib/LibMain/HerecastLib.vcp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** HerecastLib.vcp 6 Dec 2004 06:30:59 -0000 1.4 --- HerecastLib.vcp 21 Jul 2005 19:53:28 -0000 1.5 *************** *** 171,174 **** --- 171,175 ---- DEP_CPP_STDAF=\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 192,195 **** --- 193,200 ---- # Begin Source File + SOURCE=.\herecast.h + # End Source File + # Begin Source File + SOURCE=.\resource.h # End Source File *************** *** 227,230 **** --- 232,236 ---- DEP_CPP_ACCES=\ + "..\Utils\debug.h"\ "..\WiFi\AccessPoint.h"\ ".\StdAfx.h"\ *************** *** 273,276 **** --- 279,283 ---- DEP_CPP_ACCESS=\ + "..\Utils\debug.h"\ "..\WiFi\AccessPoint.h"\ "..\WiFi\AccessPointList.h"\ *************** *** 335,350 **** DEP_CPP_WIFI_=\ ! "..\Utils\md5.h"\ "..\Utils\Registry.h"\ "..\WiFi\WiFi.h"\ ".\StdAfx.h"\ ! ! NODEP_CPP_WIFI_=\ ! ".\pexport.h"\ ! ".\phlpapi.h"\ ! ".\ptypes.h"\ ! ".\tddndis.h"\ ! ".\uiddef.h"\ ! ".\uiouser.h"\ --- 342,356 ---- DEP_CPP_WIFI_=\ ! "..\Utils\debug.h"\ "..\Utils\Registry.h"\ + "..\WiFi\mynuiouser.h"\ "..\WiFi\WiFi.h"\ ".\StdAfx.h"\ ! {$(INCLUDE)}"guiddef.h"\ ! {$(INCLUDE)}"ipexport.h"\ ! {$(INCLUDE)}"Iphlpapi.h"\ ! {$(INCLUDE)}"iptypes.h"\ ! {$(INCLUDE)}"ntddndis.h"\ ! {$(INCLUDE)}"nuiouser.h"\ *************** *** 401,404 **** --- 407,411 ---- DEP_CPP_MD5C_=\ + "..\Utils\debug.h"\ "..\Utils\md5.h"\ ".\StdAfx.h"\ *************** *** 437,440 **** --- 444,448 ---- DEP_CPP_REGIS=\ + "..\Utils\debug.h"\ "..\Utils\Registry.h"\ ".\StdAfx.h"\ *************** *** 524,527 **** --- 532,536 ---- DEP_CPP_STRSE=\ + "..\Utils\debug.h"\ "..\Utils\strsep.h"\ ".\StdAfx.h"\ *************** *** 576,588 **** DEP_CPP_WINDO=\ "..\Utils\WindowsUtils.h"\ ".\StdAfx.h"\ - NODEP_CPP_WINDO=\ - "..\..\..\..\..\..\..\..\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\ARMV4\vibrate.h"\ - ".\inuserm.h"\ - ".\ipapi.h"\ - ".\ygshell.h"\ - !ELSEIF "$(CFG)" == "HerecastLib - Win32 (WCE ARMV4) Debug" --- 585,592 ---- DEP_CPP_WINDO=\ + "..\Utils\debug.h"\ "..\Utils\WindowsUtils.h"\ ".\StdAfx.h"\ !ELSEIF "$(CFG)" == "HerecastLib - Win32 (WCE ARMV4) Debug" *************** *** 634,645 **** DEP_CPP_WINDOW=\ "..\Utils\WindowsUtils.h"\ ".\StdAfx.h"\ NODEP_CPP_WINDOW=\ "..\..\..\..\..\..\..\..\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\ARMV4\vibrate.h"\ - ".\inuserm.h"\ - ".\ipapi.h"\ - ".\ygshell.h"\ --- 638,650 ---- DEP_CPP_WINDOW=\ + "..\Utils\debug.h"\ "..\Utils\WindowsUtils.h"\ ".\StdAfx.h"\ + {$(INCLUDE)}"aygshell.h"\ + {$(INCLUDE)}"sipapi.h"\ + {$(INCLUDE)}"winuserm.h"\ NODEP_CPP_WINDOW=\ "..\..\..\..\..\..\..\..\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\ARMV4\vibrate.h"\ *************** *** 759,762 **** --- 764,769 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ + "..\Utils\STLUtils.h"\ "..\Utils\strsep.h"\ ".\StdAfx.h"\ *************** *** 885,888 **** --- 892,896 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 1012,1015 **** --- 1020,1024 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ "..\Utils\strsep.h"\ ".\StdAfx.h"\ *************** *** 1137,1140 **** --- 1146,1150 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 1212,1215 **** --- 1222,1226 ---- "..\APDB\GenericItem.h"\ "..\APDB\HItem.h"\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 1312,1315 **** --- 1323,1327 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 1372,1375 **** --- 1384,1388 ---- DEP_CPP_NETWO=\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 1471,1474 **** --- 1484,1488 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 1546,1549 **** --- 1560,1564 ---- "..\APDB\HItem.h"\ "..\APDB\Service.h"\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 1603,1606 **** --- 1618,1622 ---- "..\APDB\Service.h"\ "..\APDB\Subscription.h"\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 1724,1727 **** --- 1740,1744 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 1851,1854 **** --- 1868,1872 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 1987,1990 **** --- 2005,2009 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 2108,2111 **** --- 2127,2131 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 2238,2241 **** --- 2258,2262 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 2373,2376 **** --- 2394,2398 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 2448,2459 **** DEP_CPP_DLGAB=\ "..\APDB\dlgAbout.h"\ ".\StdAfx.h"\ - NODEP_CPP_DLGAB=\ - "..\..\..\..\..\..\..\..\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\ARMV4\vibrate.h"\ - ".\inuserm.h"\ - ".\ipapi.h"\ - ".\ygshell.h"\ - !ELSEIF "$(CFG)" == "HerecastLib - Win32 (WCE ARMV4) Debug" --- 2470,2477 ---- DEP_CPP_DLGAB=\ "..\APDB\dlgAbout.h"\ + "..\Utils\debug.h"\ + "..\Utils\WindowsUtils.h"\ ".\StdAfx.h"\ !ELSEIF "$(CFG)" == "HerecastLib - Win32 (WCE ARMV4) Debug" *************** *** 2580,2592 **** "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ "..\Utils\WindowsUtils.h"\ ".\StdAfx.h"\ ! ! NODEP_CPP_DLGLO=\ ! "..\..\..\..\..\..\..\..\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\ARMV4\vibrate.h"\ ! ".\inuserm.h"\ ! ".\ipapi.h"\ ! ".\tmlctrl.h"\ ! ".\ygshell.h"\ --- 2598,2606 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ + "..\Utils\htmlctrl.h"\ "..\Utils\WindowsUtils.h"\ ".\StdAfx.h"\ ! {$(INCLUDE)}"htmlctrl.h"\ *************** *** 2708,2725 **** "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ "..\WiFi\WiFi.h"\ ".\StdAfx.h"\ ! ! NODEP_CPP_DLGOP=\ ! "..\..\..\..\..\..\..\..\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\ARMV4\vibrate.h"\ ! ".\inuserm.h"\ ! ".\ipapi.h"\ ! ".\pexport.h"\ ! ".\phlpapi.h"\ ! ".\ptypes.h"\ ! ".\tddndis.h"\ ! ".\uiddef.h"\ ! ".\uiouser.h"\ ! ".\ygshell.h"\ --- 2722,2735 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ + "..\Utils\Registry.h"\ + "..\Utils\WindowsUtils.h"\ "..\WiFi\WiFi.h"\ ".\StdAfx.h"\ ! {$(INCLUDE)}"guiddef.h"\ ! {$(INCLUDE)}"ipexport.h"\ ! {$(INCLUDE)}"Iphlpapi.h"\ ! {$(INCLUDE)}"iptypes.h"\ ! {$(INCLUDE)}"ntddndis.h"\ *************** *** 2916,2919 **** --- 2926,2931 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ + "..\Utils\htmlctrl.h"\ "..\Utils\Registry.h"\ "..\Utils\WindowsUtils.h"\ *************** *** 2922,2938 **** "..\WiFi\WiFi.h"\ ".\StdAfx.h"\ ! ! NODEP_CPP_DLGSC=\ ! "..\..\..\..\..\..\..\..\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\ARMV4\vibrate.h"\ ! ".\inuserm.h"\ ! ".\ipapi.h"\ ! ".\pexport.h"\ ! ".\phlpapi.h"\ ! ".\ptypes.h"\ ! ".\tddndis.h"\ ! ".\tmlctrl.h"\ ! ".\uiddef.h"\ ! ".\uiouser.h"\ ! ".\ygshell.h"\ --- 2934,2943 ---- "..\WiFi\WiFi.h"\ ".\StdAfx.h"\ ! {$(INCLUDE)}"guiddef.h"\ ! {$(INCLUDE)}"htmlctrl.h"\ ! {$(INCLUDE)}"ipexport.h"\ ! {$(INCLUDE)}"Iphlpapi.h"\ ! {$(INCLUDE)}"iptypes.h"\ ! {$(INCLUDE)}"ntddndis.h"\ *************** *** 3102,3115 **** "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ "..\Utils\WindowsUtils.h"\ ".\StdAfx.h"\ - NODEP_CPP_DLGSE=\ - "..\..\..\..\..\..\..\..\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\ARMV4\vibrate.h"\ - ".\inuserm.h"\ - ".\ipapi.h"\ - ".\tmlctrl.h"\ - ".\ygshell.h"\ - !ELSEIF "$(CFG)" == "HerecastLib - Win32 (WCE ARMV4) Debug" --- 3107,3114 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ "..\Utils\WindowsUtils.h"\ ".\StdAfx.h"\ !ELSEIF "$(CFG)" == "HerecastLib - Win32 (WCE ARMV4) Debug" *************** *** 3206,3218 **** "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ "..\Utils\WindowsUtils.h"\ ".\StdAfx.h"\ - NODEP_CPP_DLGSU=\ - "..\..\..\..\..\..\..\..\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\ARMV4\vibrate.h"\ - ".\inuserm.h"\ - ".\ipapi.h"\ - ".\ygshell.h"\ - !ELSEIF "$(CFG)" == "HerecastLib - Win32 (WCE ARMV4) Debug" --- 3205,3212 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ "..\Utils\WindowsUtils.h"\ ".\StdAfx.h"\ !ELSEIF "$(CFG)" == "HerecastLib - Win32 (WCE ARMV4) Debug" *************** *** 3319,3332 **** "..\APDB\SubscriptionAgent.h"\ "..\APDB\UploadAgent.h"\ "..\Utils\Registry.h"\ "..\Utils\WindowsUtils.h"\ ".\StdAfx.h"\ - NODEP_CPP_DLGUP=\ - "..\..\..\..\..\..\..\..\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\ARMV4\vibrate.h"\ - ".\inuserm.h"\ - ".\ipapi.h"\ - ".\ygshell.h"\ - !ELSEIF "$(CFG)" == "HerecastLib - Win32 (WCE ARMV4) Debug" --- 3313,3321 ---- "..\APDB\SubscriptionAgent.h"\ "..\APDB\UploadAgent.h"\ + "..\Utils\debug.h"\ "..\Utils\Registry.h"\ "..\Utils\WindowsUtils.h"\ ".\StdAfx.h"\ !ELSEIF "$(CFG)" == "HerecastLib - Win32 (WCE ARMV4) Debug" *************** *** 3457,3460 **** --- 3446,3450 ---- "..\APDB\WebAgent.h"\ "..\APDB\WebRequest.h"\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 3604,3607 **** --- 3594,3598 ---- "..\APDB\WebAgent.h"\ "..\APDB\WebRequest.h"\ + "..\Utils\debug.h"\ "..\Utils\WindowsUtils.h"\ ".\StdAfx.h"\ *************** *** 3754,3757 **** --- 3745,3749 ---- "..\APDB\WebAgent.h"\ "..\APDB\WebRequest.h"\ + "..\Utils\debug.h"\ "..\Utils\md5.h"\ "..\Utils\Registry.h"\ *************** *** 3834,3837 **** --- 3826,3830 ---- "..\APDB\WebAgent.h"\ "..\APDB\WebRequest.h"\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 3880,3883 **** --- 3873,3877 ---- DEP_CPP_WEBRE=\ "..\APDB\WebRequest.h"\ + "..\Utils\debug.h"\ ".\StdAfx.h"\ *************** *** 4000,4003 **** --- 3994,3998 ---- "..\APDB\SubscriptionAgent.h"\ "..\APDB\UploadAgent.h"\ + "..\Utils\debug.h"\ "..\Utils\Registry.h"\ "..\Utils\WindowsUtils.h"\ *************** *** 4170,4185 **** "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ "..\WiFi\AccessPoint.h"\ "..\WiFi\AccessPointList.h"\ "..\WiFi\WiFi.h"\ ".\StdAfx.h"\ ! ! NODEP_CPP_LOCAT=\ ! ".\pexport.h"\ ! ".\phlpapi.h"\ ! ".\ptypes.h"\ ! ".\tddndis.h"\ ! ".\uiddef.h"\ ! ".\uiouser.h"\ --- 4165,4179 ---- "..\APDB\Subscription.h"\ "..\APDB\SubscriptionAgent.h"\ + "..\Utils\debug.h"\ "..\WiFi\AccessPoint.h"\ "..\WiFi\AccessPointList.h"\ "..\WiFi\WiFi.h"\ + ".\herecast.h"\ ".\StdAfx.h"\ ! {$(INCLUDE)}"guiddef.h"\ ! {$(INCLUDE)}"ipexport.h"\ ! {$(INCLUDE)}"Iphlpapi.h"\ ! {$(INCLUDE)}"iptypes.h"\ ! {$(INCLUDE)}"ntddndis.h"\ *************** *** 4217,4220 **** --- 4211,4215 ---- "..\WiFi\AccessPointList.h"\ "..\WiFi\WiFi.h"\ + ".\herecast.h"\ ".\StdAfx.h"\ {$(INCLUDE)}"guiddef.h"\ |
|
From: Mark P. <mdp...@us...> - 2005-07-21 19:48:09
|
Update of /cvsroot/herecast/herecast/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15137/src Modified Files: Herecast.vco Herecast.vcw Log Message: added HerecastTester project, initially just for testing the API Index: Herecast.vcw =================================================================== RCS file: /cvsroot/herecast/herecast/src/Herecast.vcw,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Herecast.vcw 28 Apr 2004 05:31:09 -0000 1.1 --- Herecast.vcw 21 Jul 2005 19:44:00 -0000 1.2 *************** *** 16,19 **** --- 16,31 ---- ############################################################################### + Project: "HerecastTester"=".\HerecastTester\HerecastTester.vcp" - Package Owner=<4> + + Package=<5> + {{{ + }}} + + Package=<4> + {{{ + }}} + + ############################################################################### + Project: "Scanner"=".\StandaloneScanner\Scanner.vcp" - Package Owner=<4> Index: Herecast.vco =================================================================== RCS file: /cvsroot/herecast/herecast/src/Herecast.vco,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 Binary files /tmp/cvsvJyRt7 and /tmp/cvslqvKz7 differ |
|
From: Mark P. <mdp...@us...> - 2005-07-21 19:46:14
|
Update of /cvsroot/herecast/herecast/src/HerecastTester In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14441/HerecastTester Log Message: Directory /cvsroot/herecast/herecast/src/HerecastTester added to the repository |
|
From: Mark P. <mdp...@us...> - 2005-07-21 19:45:37
|
Update of /cvsroot/herecast/herecast/src/HerecastLib/LibMain In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14032/src/HerecastLib/LibMain Modified Files: HerecastLibXP.rc Log Message: case change of main window from HERECAST to Herecast for consistency between XP and CE versions Index: HerecastLibXP.rc =================================================================== RCS file: /cvsroot/herecast/herecast/src/HerecastLib/LibMain/HerecastLibXP.rc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** HerecastLibXP.rc 14 Dec 2004 07:35:11 -0000 1.10 --- HerecastLibXP.rc 21 Jul 2005 19:41:01 -0000 1.11 *************** *** 688,692 **** IDS_APP_TITLE "802.11 Scanner" IDS_TODAY_LOC_UNRECOGNIZED "I don't recognize this place." ! IDC_HERECAST "HERECAST" IDS_TODAY_LOC_CURRENT "You are at %s" IDS_TODAY_LOC_NEAR "You are near %s" --- 688,692 ---- IDS_APP_TITLE "802.11 Scanner" IDS_TODAY_LOC_UNRECOGNIZED "I don't recognize this place." ! IDC_HERECAST "Herecast" IDS_TODAY_LOC_CURRENT "You are at %s" IDS_TODAY_LOC_NEAR "You are near %s" |