Skip to content

Commit

Permalink
Fix broken merge;
Browse files Browse the repository at this point in the history
git-svn-id: http://frl.googlecode.com/svn/trunk@220 daf5c975-553e-0410-8cda-3135a9dfd8f3
  • Loading branch information
gmist committed Feb 14, 2009
1 parent 36d1a49 commit 022bde8
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 750 deletions.
4 changes: 0 additions & 4 deletions include/opc/impl/frl_opc_impl_browse.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,18 @@

namespace frl { namespace opc { namespace impl {

<<<<<<< .working
=======
/*!
\class BrowseImpl
\brief IOPCBrowse implementation.
\details IOPCBrowse interface provides improved methods for browsing the server address space and for obtaining the item properties.
*/
>>>>>>> .merge-right.r218
class BrowseImpl
: public IOPCBrowse,
virtual public opc::OPCServerBase
{
public:
virtual ~BrowseImpl();

// IOPCBrowse implementation
STDMETHODIMP GetProperties(
/* [in] */ DWORD dwItemCount,
/* [size_is][string][in] */ LPWSTR *pszItemIDs,
Expand Down
4 changes: 2 additions & 2 deletions src/opc/impl/frl_opc_impl_browse_server_address_space.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ STDMETHODIMP BrowseServerAddressSpace::BrowseOPCItemIDs(

// filtration by name
if( szFilterCriteria != NULL && wcslen( szFilterCriteria ) != 0 )
{
{
#if( FRL_CHARACTER == FRL_CHARACTER_UNICODE )
String filter = szFilterCriteria;
#else
Expand Down Expand Up @@ -394,7 +394,7 @@ STDMETHODIMP BrowseServerAddressSpace::GetItemID(
return E_INVALIDARG;
tag = opcAddressSpace::getInstance().getTag( itemDataID );
}

#if( FRL_CHARACTER == FRL_CHARACTER_UNICODE )
*szItemID = util::duplicateString( tag->getID() );
#else
Expand Down
97 changes: 6 additions & 91 deletions src/opc/impl/frl_opc_impl_common.cpp
Original file line number Diff line number Diff line change
@@ -1,92 +1,3 @@
<<<<<<< .working
#include "opc/impl/frl_opc_impl_common.h"
#if( FRL_PLATFORM == FRL_PLATFORM_WIN32 )
#include <WinNT.h>
#include "../dependency/vendors/opc_foundation/opcerror.h"
#include "os/win32/com/frl_os_win32_com_allocator.h"
#include "opc/frl_opc_util.h"
#include "sys/frl_sys_util.h"

namespace frl { namespace opc { namespace impl {

OPCCommon::OPCCommon() : lcid( 0 )
{
}

OPCCommon::~OPCCommon()
{
}

STDMETHODIMP OPCCommon::SetLocaleID( /* [in] */ LCID dwLcid )
{
switch( dwLcid )
{
case MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT):
case MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), SORT_DEFAULT):
case LOCALE_NEUTRAL:
case LOCALE_INVARIANT:
case LOCALE_SYSTEM_DEFAULT:
case LOCALE_USER_DEFAULT:
{
lcid = dwLcid;
return S_OK;
}
}
return E_INVALIDARG;
}

STDMETHODIMP OPCCommon::GetLocaleID( /* [out] */ LCID *pdwLcid )
{
if( pdwLcid == NULL )
return E_INVALIDARG;
*pdwLcid = lcid;
return S_OK;
}

STDMETHODIMP OPCCommon::QueryAvailableLocaleIDs( /* [out] */ DWORD *pdwCount, /* [size_is][size_is][out] */ LCID **pdwLcid )
{
if( pdwCount == NULL || pdwLcid == NULL )
return E_INVALIDARG;

*pdwCount = 6;
*pdwLcid = os::win32::com::allocMemory< LCID >( *pdwCount );

(*pdwLcid)[0] = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT);
(*pdwLcid)[1] = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), SORT_DEFAULT);
(*pdwLcid)[2] = LOCALE_SYSTEM_DEFAULT;
(*pdwLcid)[3] = LOCALE_USER_DEFAULT;
(*pdwLcid)[4] = LOCALE_NEUTRAL;
(*pdwLcid)[5] = LOCALE_INVARIANT;

return S_OK;
}

STDMETHODIMP OPCCommon::GetErrorString( /* [in] */ HRESULT dwError, /* [string][out] */ LPWSTR *ppString )
{
if( ppString == NULL )
return E_INVALIDARG;

*ppString = NULL;
return util::getErrorString( dwError, lcid, &ppString );
}

STDMETHODIMP OPCCommon::SetClientName( /* [string][in] */ LPCWSTR szName )
{
#if( FRL_CHARACTER == FRL_CHARACTER_UNICODE )
clientName = szName;
#else
clientName = wstring2string( szName );
#endif

return S_OK;
}

} // namespace impl
} // namespace opc
} // FatRat Library

#endif // FRL_PLATFORM_WIN32
=======
#include "opc/impl/frl_opc_impl_common.h"
#if( FRL_PLATFORM == FRL_PLATFORM_WIN32 )
#include <WinNT.h>
Expand Down Expand Up @@ -256,7 +167,12 @@ STDMETHODIMP OPCCommon::GetErrorString( /* [in] */ HRESULT dwError, /* [string][
*/
STDMETHODIMP OPCCommon::SetClientName( /* [string][in] */ LPCWSTR szName )
{
clientName = similarCompatibility( szName );
#if( FRL_CHARACTER == FRL_CHARACTER_UNICODE )
clientName = szName;
#else
clientName = wstring2string( szName );
#endif

return S_OK;
}

Expand All @@ -265,4 +181,3 @@ STDMETHODIMP OPCCommon::SetClientName( /* [string][in] */ LPCWSTR szName )
} // FatRat Library

#endif // FRL_PLATFORM_WIN32
>>>>>>> .merge-right.r218
Loading

0 comments on commit 022bde8

Please sign in to comment.