~ubuntu-branches/ubuntu/gutsy/amarok/gutsy-updates

« back to all changes in this revision

Viewing changes to amarok/src/engine/helix/helix-sp/hspcontext.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2006-11-03 23:57:33 UTC
  • mfrom: (1.31.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061103235733-a41oyfz4mzienqin
Tags: 2:1.4.4-0ubuntu2
Add debian/kubuntu-media-amarok and
debian amarok_play_audiocd.desktop for good KDE integration

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
/*
3
3
 *
4
4
 * This software is released under the provisions of the GPL version 2.
5
 
 * see file "COPYING".  If that file is not available, the full statement 
 
5
 * see file "COPYING".  If that file is not available, the full statement
6
6
 * of the license can be found at
7
7
 *
8
8
 * http://www.fsf.org/licensing/licenses/gpl.txt
9
9
 *
10
10
 * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved.
11
11
 * Portions (c) Paul Cifarelli 2005
12
 
 * 
 
12
 *
13
13
 *
14
14
 */
15
15
#include "hxcomm.h"
43
43
 
44
44
void HSPEngineContext::Close()
45
45
{
46
 
   // you dont own the common class factory, so dont even think about it...
 
46
   // you don't own the common class factory, so don't even think about it...
47
47
}
48
48
 
49
49
// *** IUnknown methods ***
52
52
//  Method:
53
53
//      IUnknown::QueryInterface
54
54
//  Purpose:
55
 
//      Implement this to export the interfaces supported by your 
 
55
//      Implement this to export the interfaces supported by your
56
56
//      object.
57
57
//
58
58
STDMETHODIMP HSPEngineContext::QueryInterface(REFIID riid, void** ppvObj)
123
123
    unsigned char *outbuf;
124
124
    IHXBuffer *ibuf;
125
125
 
126
 
    
 
126
 
127
127
    m_splayer->print2stderr("in engine context, key is <%s>\n", pref_key);
128
128
    if (0 == (stricmp(pref_key, "OpenAudioDeviceOnPlayback")))
129
129
    {
133
133
          ibuf->SetSize(2);
134
134
          outbuf = ibuf->GetBuffer();
135
135
          strcpy((char *)outbuf, "0");
136
 
          buffer = ibuf;          
 
136
          buffer = ibuf;
137
137
          //m_splayer->print2stderr("value = %d\n",atol((const char*) buffer->GetBuffer()));
138
138
       }
139
139
    }
290
290
{
291
291
   //char* pszCipher = NULL;
292
292
 
293
 
        
 
293
 
294
294
    m_pClientSink       = new HSPClientAdviceSink(pUnknown, m_lClientIndex, m_splayer);
295
295
    m_pErrorSink        = new HSPErrorSink(pUnknown, m_splayer);
296
296
    m_pAuthMgr          = new HSPAuthenticationManager(m_splayer);
299
299
    {
300
300
        m_pClientSink->AddRef();
301
301
    }
302
 
    
 
302
 
303
303
    if (m_pErrorSink)
304
304
    {
305
305
        m_pErrorSink->AddRef();
345
345
//  Method:
346
346
//      IUnknown::QueryInterface
347
347
//  Purpose:
348
 
//      Implement this to export the interfaces supported by your 
 
348
//      Implement this to export the interfaces supported by your
349
349
//      object.
350
350
//
351
351
STDMETHODIMP HSPClientContext::QueryInterface(REFIID riid, void** ppvObj)
362
362
        *ppvObj = (IHXPreferences*)this;
363
363
        return HXR_OK;
364
364
    }
365
 
    else if (m_pClientSink && 
 
365
    else if (m_pClientSink &&
366
366
             m_pClientSink->QueryInterface(riid, ppvObj) == HXR_OK)
367
367
    {
368
368
        return HXR_OK;
369
369
    }
370
 
    else if (m_pErrorSink && 
 
370
    else if (m_pErrorSink &&
371
371
             m_pErrorSink->QueryInterface(riid, ppvObj) == HXR_OK)
372
372
    {
373
373
        return HXR_OK;
425
425
{
426
426
    HX_RESULT hResult   = HXR_OK;
427
427
    //char*     pszCipher = NULL;
428
 
    
 
428
 
429
429
    if ((stricmp(pref_key, CLIENT_GUID_REGNAME) == 0) &&
430
430
        (*m_pszGUID))
431
431
    {
432
 
        // Create a Buffer 
 
432
        // Create a Buffer
433
433
       //TODO: Implement an IHXBuffer
434
434
 
435
435
//       buffer = new CHXBuffer();
463
463
    {
464
464
        return m_pDefaultPrefs->WritePref(pref_key, buffer);
465
465
    }
466
 
    else        
 
466
    else
467
467
    {
468
468
        return HXR_OK;
469
469
    }