forked from len0rd/rockbox
MTP_DLL:
* update license to BSD * clean some comments * add README file git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20049 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
28eb803f79
commit
5883f09ace
7 changed files with 150 additions and 99 deletions
|
@ -1,5 +1,4 @@
|
||||||
// MTP_DLL.cpp : Defines the entry point for the DLL application.
|
/* MTP_DLL.cpp : Defines the entry point for the DLL application. */
|
||||||
//
|
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "MTP_DLL.h"
|
#include "MTP_DLL.h"
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
// The following ifdef block is the standard way of creating macros which make exporting
|
|
||||||
// from a DLL simpler. All files within this DLL are compiled with the MTP_DLL_EXPORTS
|
|
||||||
// symbol defined on the command line. this symbol should not be defined on any project
|
|
||||||
// that uses this DLL. This way any other project whose source files include this file see
|
|
||||||
// MTP_DLL_API functions as being imported from a DLL, whereas this DLL sees symbols
|
|
||||||
// defined with this macro as being exported.
|
|
||||||
#ifdef MTP_DLL_EXPORTS
|
#ifdef MTP_DLL_EXPORTS
|
||||||
#define MTP_DLL_API __declspec(dllexport)
|
#define MTP_DLL_API __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
|
@ -14,4 +8,3 @@ extern "C"
|
||||||
{
|
{
|
||||||
__declspec(dllexport) bool send_fw(LPWSTR file, int filesize, void (*callback)(unsigned int progress, unsigned int max));
|
__declspec(dllexport) bool send_fw(LPWSTR file, int filesize, void (*callback)(unsigned int progress, unsigned int max));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
|
||||||
# Visual Studio 2005
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MTP_DLL", "MTP_DLL.vcproj", "{C7A39A2D-2ADF-40A3-A9A5-0DF4509B761B}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Win32 = Debug|Win32
|
|
||||||
Release|Win32 = Release|Win32
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{C7A39A2D-2ADF-40A3-A9A5-0DF4509B761B}.Debug|Win32.ActiveCfg = Debug|Win32
|
|
||||||
{C7A39A2D-2ADF-40A3-A9A5-0DF4509B761B}.Debug|Win32.Build.0 = Debug|Win32
|
|
||||||
{C7A39A2D-2ADF-40A3-A9A5-0DF4509B761B}.Release|Win32.ActiveCfg = Release|Win32
|
|
||||||
{C7A39A2D-2ADF-40A3-A9A5-0DF4509B761B}.Release|Win32.Build.0 = Release|Win32
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
67
utils/MTP/MTP_DLL/README
Executable file
67
utils/MTP/MTP_DLL/README
Executable file
|
@ -0,0 +1,67 @@
|
||||||
|
Windows MTP Firmware Uploading Implementation
|
||||||
|
=============================================
|
||||||
|
|
||||||
|
This code is based on http://opensource.creative.com/mtp_xfer.html and was
|
||||||
|
edited by Maurus Cuelenaere for the Rockbox project.
|
||||||
|
|
||||||
|
It is released under the BSD license:
|
||||||
|
|
||||||
|
Copyright (c) 2009, Maurus Cuelenaere
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of the <organization> nor the
|
||||||
|
names of its contributors may be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY MAURUS CUELENAERE ''AS IS'' AND ANY
|
||||||
|
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL MAURUS CUELENAERE BE LIABLE FOR ANY
|
||||||
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
Based on these mails from devsupport AT creativelabs DOT com, the original code
|
||||||
|
is believed to be in the Public Domain:
|
||||||
|
|
||||||
|
|
||||||
|
From: CLI Developer Support <devsupport AT creativelabs DOT com>
|
||||||
|
Sender: Ian Minett
|
||||||
|
Date: Wed, 18 Feb 2009 17:34:14 -0800
|
||||||
|
>Hi,
|
||||||
|
>
|
||||||
|
>The code found at http://connect.creativelabs.com/opensource/ is open
|
||||||
|
>and made freely available on the connect site for use by developers
|
||||||
|
>such as yourself. You are welcome to use the code as you like.
|
||||||
|
>
|
||||||
|
>If you need to know the specific license it is released under, I'm afraid
|
||||||
|
> I will have to chase it up since I don't believe that site is being
|
||||||
|
> maintained anymore.
|
||||||
|
>
|
||||||
|
>Hope that helps,
|
||||||
|
>Ian
|
||||||
|
|
||||||
|
|
||||||
|
From: CLI Developer Support <devsupport AT creativelabs DOT com>
|
||||||
|
Sender: Daniel PEACOCK
|
||||||
|
Date: Thu, 19 Feb 2009 14:08:39 +0000
|
||||||
|
>Hi,
|
||||||
|
>
|
||||||
|
>The MTP transfer example code is free to use for any purpose - commercial or otherwise.
|
||||||
|
>You can include it, or a variant of it, in your open-source project.
|
||||||
|
>
|
||||||
|
>Thanks for asking,
|
||||||
|
>
|
||||||
|
>Dan
|
||||||
|
>Creative Labs, UK
|
|
@ -1,8 +1,33 @@
|
||||||
/* Windows MTP Firmware Uploading Implementation
|
/*
|
||||||
|
* Windows MTP Firmware Uploading Implementation
|
||||||
*
|
*
|
||||||
* Based on http://opensource.creative.com/mtp_xfer.html
|
* Based on http://opensource.creative.com/mtp_xfer.html
|
||||||
*
|
|
||||||
* Edited by Maurus Cuelenaere for Rockbox
|
* Edited by Maurus Cuelenaere for Rockbox
|
||||||
|
*
|
||||||
|
* Copyright (c) 2009, Maurus Cuelenaere
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <organization> nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY MAURUS CUELENAERE ''AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL MAURUS CUELENAERE BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
// stdafx.cpp : source file that includes just the standard includes
|
/* stdafx.cpp : source file that includes just the standard includes
|
||||||
// MTP_DLL.pch will be the pre-compiled header
|
MTP_DLL.pch will be the pre-compiled header
|
||||||
// stdafx.obj will contain the pre-compiled type information
|
stdafx.obj will contain the pre-compiled type information */
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
// TODO: reference any additional headers you need in STDAFX.H
|
|
||||||
// and not in this file
|
|
||||||
|
|
|
@ -1,32 +1,22 @@
|
||||||
// stdafx.h : include file for standard system include files,
|
|
||||||
// or project specific include files that are used frequently, but
|
|
||||||
// are changed infrequently
|
|
||||||
//
|
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Modify the following defines if you have to target a platform prior to the ones specified below.
|
/* Modify the following defines if you have to target a platform prior to the ones specified below.
|
||||||
// Refer to MSDN for the latest info on corresponding values for different platforms.
|
Refer to MSDN for the latest info on corresponding values for different platforms. */
|
||||||
#ifndef WINVER // Allow use of features specific to Windows XP or later.
|
#ifndef WINVER /* Allow use of features specific to Windows XP or later. */
|
||||||
#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
|
#define WINVER 0x0501 /* Change this to the appropriate value to target other versions of Windows. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
|
#ifndef _WIN32_WINNT /* Allow use of features specific to Windows XP or later. */
|
||||||
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
|
#define _WIN32_WINNT 0x0501 /* Change this to the appropriate value to target other versions of Windows. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
|
#ifndef _WIN32_WINDOWS /* Allow use of features specific to Windows 98 or later. */
|
||||||
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
|
#define _WIN32_WINDOWS 0x0410 /* Change this to the appropriate value to target Windows Me or later. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
|
#ifndef _WIN32_IE /* Allow use of features specific to IE 6.0 or later. */
|
||||||
#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
|
#define _WIN32_IE 0x0600 /* Change this to the appropriate value to target other versions of IE. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
#define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */
|
||||||
// Windows Header Files:
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO: reference additional headers your program requires here
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue