CASA-auth-token-client: rename lib directory to library and change in makefile

This commit is contained in:
soochoi
2007-01-03 05:04:26 +00:00
parent 33c3cf2ecf
commit 96204153a8
78 changed files with 11 additions and 11 deletions

View File

@@ -0,0 +1,187 @@
/***********************************************************************
*
* Copyright (C) 2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
* Author: Juan Carlos Luciani <jluciani@novell.com>
*
***********************************************************************/
#include "platform.h"
// Extern functions
extern
void NonHttpTest(void);
extern
void HttpTest(void);
// Globals
char usageString[] = "usage: test -a serverAddress -p serverPort [-s serviceName] [-h]\n";
char *pServerAddress = NULL;
int serverPort = 0;
BOOLEAN execHttpTest = FALSE;
char serviceName[] = "testService";
char *pServiceName = serviceName;
/***********************************************************************
*
* dtoul()
*
***********************************************************************/
int
dtoul(
IN char *cp,
IN int len)
{
int n = 0;
int i;
for (i = 0; i < len; i++, cp++)
{
// Verify that we are dealing with a valid digit
if (*cp >= '0' && *cp <= '9')
{
n = 10 * n + (*cp - '0');
}
else
{
printf("-dtoul- Found invalid digit\n");
break;
}
}
return n;
}
/***********************************************************************
*
* main()
*
***********************************************************************/
int main(int argc, char* argv[])
{
// Process input parameters
int i = 1;
while(argv[i] != NULL)
{
if (stricmp(argv[i], "-a") == 0)
{
// Server Address option, the next argument should
// contain the address.
i++;
if (argv[i] != NULL)
{
pServerAddress = argv[i];
}
else
{
printf(usageString);
return -1;
}
}
else if (stricmp(argv[i], "-p") == 0)
{
// Server port option, the next argument should
// contain the port.
i++;
if (argv[i] != NULL)
{
serverPort = htons(dtoul(argv[i], (int) strlen(argv[i])));
}
else
{
printf(usageString);
return -1;
}
}
else if (stricmp(argv[i], "-s") == 0)
{
// Service name option, the next argument should
// contain the name of the service to be targeted.
i++;
if (argv[i] != NULL)
{
pServiceName = argv[i];
}
else
{
printf(usageString);
return -1;
}
}
else if (stricmp(argv[i], "-h") == 0)
{
// Perform http test option
execHttpTest = TRUE;
}
// Advance to the next argument
i++;
}
// Verify that the server address and port were specified
if (pServerAddress && serverPort != 0)
{
int winsockStartupResult;
WSADATA winsockData;
// First initialize winsock
if ((winsockStartupResult = WSAStartup(MAKEWORD(2,2), &winsockData)) == 0)
{
// Repeat the test when indicated
printf("Press 'Enter' to run test or 'n + Enter' to stop.\n");
while(getchar() != 'n')
{
// Execute the appropriate test
if (execHttpTest)
{
HttpTest();
}
else
{
NonHttpTest();
}
printf("Press 'Enter' to run test or 'n + Enter' to stop.\n");
}
// Close winsock
WSACleanup();
}
else
{
printf("-main- WSAStartup failed, error = %d\n", winsockStartupResult);
}
}
else
{
printf(usageString);
return -1;
}
return 0;
}

View File

@@ -0,0 +1,29 @@
/***********************************************************************
*
* Copyright (C) 2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
* Author: Juan Carlos Luciani <jluciani@novell.com>
*
***********************************************************************/
#include <stdio.h>
#include <windows.h>
#include "casa_c_authtoken.h"
//#define errno WSAGetLastError()

View File

@@ -0,0 +1,218 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="test"
ProjectGUID="{6034EBF1-0838-45C4-A538-A41A31EC8F46}"
RootNamespace="test"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="-D&quot;_CRT_SECURE_NO_DEPRECATE&quot;"
Optimization="0"
AdditionalIncludeDirectories=".\;..\..\..\include;&quot;C:\Program Files\novell\CASA\include&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="casa_authtoken.lib ws2_32.lib"
OutputFile="$(OutDir)/test.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;C:\Program Files\novell\CASA\lib&quot;;&quot;C:\Dev\casa\CASA-auth-token\client\lib\windows&quot;"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/test.pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy ..\..\windows\debug\casa_authtoken.dll debug\casa_authtoken.dll"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="-D&quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalIncludeDirectories=".\;..\..\..\include;&quot;C:\Program Files\novell\CASA\include&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="casa_authtoken.lib ws2_32.lib"
OutputFile="$(OutDir)/test.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;C:\Program Files\novell\CASA\lib&quot;"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\CASA_Auth.cpp"
>
</File>
<File
RelativePath=".\main.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\platform.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>