{"id":25932670,"url":"https://github.com/socketmobile/warrantychecker-windows","last_synced_at":"2026-05-09T11:55:13.267Z","repository":{"id":115908127,"uuid":"43066621","full_name":"SocketMobile/warrantychecker-windows","owner":"SocketMobile","description":"Sample code for ScanAPI SDK to show how to check the scanner registration, and to register a scanner.","archived":false,"fork":false,"pushed_at":"2015-09-24T12:55:43.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-18T09:45:27.039Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SocketMobile.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-24T12:54:29.000Z","updated_at":"2015-09-25T16:09:23.000Z","dependencies_parsed_at":"2023-03-13T13:01:09.281Z","dependency_job_id":null,"html_url":"https://github.com/SocketMobile/warrantychecker-windows","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketMobile%2Fwarrantychecker-windows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketMobile%2Fwarrantychecker-windows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketMobile%2Fwarrantychecker-windows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketMobile%2Fwarrantychecker-windows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SocketMobile","download_url":"https://codeload.github.com/SocketMobile/warrantychecker-windows/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241763763,"owners_count":20016161,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-04T00:38:45.366Z","updated_at":"2026-05-09T11:55:08.232Z","avatar_url":"https://github.com/SocketMobile.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Warranty Extension API Sample\n\nThis C# program demonstrates the usage of both the ScanAPI and REST API's to get \nwarranty status and request an extension for a connected CHS Scanner.\n\nIt is built with VS2010 (or higher) due to the usage of the NuGet RESTSharp \npackage.  This package should be automatically downloaded from NuGet main \nrepository at nuget.org, but if not, it can be found at: \nhttps://github.com/restsharp/RestSharp\n\nAdditionally, it utilizes the ScanApiHelper file from the ScanAPI SDK NuGet to \nfaciltate interaction with ScanAPI.\n\n## Prerequisite\nThe ScanAPI SDK NuGet is required for this sample. This is a private NuGet that\nneeds to be downloaded from Socket Mobile.\n\nThis is intended as a sample only, as all error checking and thread management \nis not included.\n\n## Description\nThe registration of the scanner requires the scanner Bluetooth address. That's\nhow the scanner is identified in Socket warranty registration database.\n\nScanApiHelper is actually a data member of the WarrantyChecker Form object.\nIt gets allocated in the Form constructor function. This is also a good place to\nset the notification reference to this Form which derives from \nScanApiHelperNotification.\n\nThe ScanApiHelperNotification provides an interface of the possible \nnotifications coming from ScanAPI.\n\nScanApiHelper is then opens in the Form Load handler. A timer is also set that \nis used to \"consume\" any asynchronous events comming from ScanAPI. The handler \nof this timer just called the function ScanApiHelper DoScanAPIReceive.\n\nThe rest of the code is driven by the notifications received from ScanAPI.\n\nThe initial state is to wait for a scanner to connect. Once a scanner connects,\nthis app receive the OnDeviceArrival notification. In this notification the \nrequest of reading the scanner Bluetooth address is made by calling the \nScanApiHelper PostGetBtAddress. This function returns immediately, and the \nresponse will be received in the callback passed as argument.\n\nOnce the Get Bluetooth address has completed, the callback OnGetBdAddress is \ncalled. In this callback the request to get the firmware version of the scanner\nis made.\nThe Bluetooth address of the scanner is saved in the data member of the Form.\n\nThe get scanner firmware version is retrieved in the OnGetFirmwareVersion \ncallback, and again this version is saved in the Form data member.\n\nOnce this last callback is received, then the ScanApiHelper is close as it is no\nlonger needed.\nA thread to check the warranty starts at this point.\n\nThe DoWarrantyUpdateThread thread is invoked and proceed by checking the \nWarranty of this specific scanner. If this check is true, then it proceed to the\nWarranty extension request.\n\nBoth of these request are REST requests. The details can be found in the code\nbehind the Rest.cs Form.\n\n\n \n\n\n \n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketmobile%2Fwarrantychecker-windows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocketmobile%2Fwarrantychecker-windows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketmobile%2Fwarrantychecker-windows/lists"}