Example #1
0
/*! Set up proxy classes and basic methods at class creation time
    This ensures that they are processed before the registered flext messages
*/
void flext_base::Setup(t_classid id)
{
    t_class *c = getClass(id);

#if FLEXT_SYS == FLEXT_SYS_MAX
	if(!IsLib(id))
#endif
        AddMessageMethods(c,IsDSP(id),HasDSPIn(id));

    if(HasAttributes(id)) {
        AddMethod(id,0,"getattributes",cb_ListAttrib);
        AddMethod(id,0,"getmethods",cb_ListMethods);

#if FLEXT_SYS == FLEXT_SYS_PD && !defined(FLEXT_NOATTREDIT)
        AddMethod(id,0,"attributedialog",cb_AttrDialog);
#endif
    }

#if FLEXT_SYS == FLEXT_SYS_PD
    SetGfx(id);
#endif
}
Example #2
0
//---------------------------------------------------------------------------
int __fastcall CXWave::IsOutBufFull(void)
{
	if( !IsLib() ) return 0;
	return fmmwIsOutFull();
}
Example #3
0
//---------------------------------------------------------------------------
int __fastcall CXWave::IsOutBufCritical(void)
{
	if( !IsLib() ) return 0;
	return fmmwIsOutCritical();
}
Example #4
0
//---------------------------------------------------------------------------
void __fastcall CXWave::SetOutBCC(int count)
{
	if( !IsLib() ) return;
	fmmwSetOutCounter(count);
}
Example #5
0
//---------------------------------------------------------------------------
int __fastcall CXWave::GetOutBCC(void)
{
	if( !IsLib() ) return 0;
	return fmmwGetOutCounter();
}
Example #6
0
//---------------------------------------------------------------------------
int __fastcall CXWave::GetOutBC(void)
{
	if( !IsLib() ) return 0;
	return fmmwGetOutRemaining();
}
Example #7
0
//---------------------------------------------------------------------------
BOOL __fastcall CXWave::OutWrite(const SHORT *p)
{
	if( !IsLib() ) return FALSE;
	return fmmwOutWrite(p);
}
Example #8
0
//---------------------------------------------------------------------------
void __fastcall CXWave::OutFlush(void)
{
	if( !IsLib() ) return;
	fmmwOutFlush();
}
Example #9
0
//---------------------------------------------------------------------------
int __fastcall CXWave::GetInBC(void)
{
	if( !IsLib() ) return 0;
	return fmmwGetInExist();
}
Example #10
0
//---------------------------------------------------------------------------
BOOL __fastcall CXWave::OutOpen(int sampfreq, int size)
{
	if( !IsLib() ) return FALSE;
	return fmmwOutOpen(sampfreq, size);
}
Example #11
0
//---------------------------------------------------------------------------
BOOL __fastcall CXWave::InRead(SHORT *p)
{
	if( !IsLib() ) return FALSE;

	return fmmwInRead(p);
}
Example #12
0
//---------------------------------------------------------------------------
void __fastcall CXWave::InClose(void)
{
	if( !IsLib() ) return;

	fmmwInClose();
}
Example #13
0
//---------------------------------------------------------------------------
void __fastcall CXWave::PumpMessages(void)
{
	if( !IsLib() ) return;

	fmmwPumpMessages();
}
Example #14
0
//---------------------------------------------------------------------------
void __fastcall CXWave::SetPTT(int tx)
{
	if( !IsLib() ) return;
	fmmwSetPTT(tx);
}
Example #15
0
//---------------------------------------------------------------------------
void __fastcall CXWave::OutAbort(void)
{
	if( !IsLib() ) return;
	fmmwOutAbort();
}
Example #16
0
//---------------------------------------------------------------------------
int __fastcall CXWave::GetTimeout(void)
{
	if( !IsLib() ) return 200;
	return fmmwGetTimeout();
}
Example #17
0
// Connect SyncML engine
TSyError UI_Connect( UI_Call_In &aCI, appPointer &aDLL, bool &aIsServer,
                                                        cAppCharP aEngineName,
                                                        CVersion  aPrgVersion,
                                                        uInt16    aDebugFlags )
{
  // Always search for BOTH names, independently of environment
  cAppCharP SyFName= "SySync_ConnectEngine";
  cAppCharP   FName=        "ConnectEngine";
  string        name= aEngineName;
  TSyError       err= 0;
  bool           dbg= ( aDebugFlags & DBG_PLUGIN_DIRECT )!=0;

  CVersion   engVersion;
  appPointer fFunc;

  ConnectEngine_Func fConnectEngine= NULL;

  aIsServer = false;
  do {
    aCI = NULL; // no such structure available at the beginning
    aDLL= NULL;
    if (dbg) printf( "name='%s' err=%d\n", name.c_str(), err );

    if (name.empty()) {
       // not yet fully implemented: Take default settings
                         aCI= new SDK_Interface_Struct;
      InitCallback_Pure( aCI,      DB_Callback_Version );
                         aCI->debugFlags= aDebugFlags;
      break;
    } // if

    if (IsLib( name.c_str() )) {
      if (name == "[]") {
        #ifdef DBAPI_LINKED
          fConnectEngine= SYSYNC_EXTERNAL(ConnectEngine);
        #endif
      } else if (name == "[server:]") {
        aIsServer=true;
        #ifdef DBAPI_SRV_LINKED
          fConnectEngine= SySync_srv_ConnectEngine;
        #endif
      }

      break;
    } // if

    cAppCharP prefix = "server:";
    size_t prefixlen = strlen(prefix);
    if (name.size() > prefixlen &&
        !name.compare(0, prefixlen, prefix)) {
      // ignore prefix and if we find the lib, look for different entry points
      aIsServer=true;
      name = name.substr(prefixlen);
      SyFName= "SySync_srv_ConnectEngine";
      FName=        "srv_ConnectEngine";
    }

    err= ConnectDLL( name.c_str(), aDLL ); // try with name directly
    if (dbg) printf( "modu='%s' err=%d\n", name.c_str(), err );

    if (err) {
                         name+= DLL_Suffix;
        err= ConnectDLL( name.c_str(), aDLL ); // try with suffix next
    } // if

    if (dbg) printf( "modu='%s' err=%d\n", name.c_str(), err );
    if (err) break;

    cAppCharP              fN= SyFName;
    err=   DLL_Func( aDLL, fN,   fFunc );
    fConnectEngine=   (ConnectEngine_Func)fFunc;
    if   (dbg) printf( "func err=%d '%s' %s\n", err, fN, RefStr( (void*)fConnectEngine ).c_str() );

    if (!fConnectEngine) { fN=   FName;
      err= DLL_Func( aDLL, fN,   fFunc );
      fConnectEngine= (ConnectEngine_Func)fFunc;
      if (dbg) printf( "func err=%d '%s' %s\n", err, fN, RefStr( (void*)fConnectEngine ).c_str() );
   } // if

  } while (false);

  if    (fConnectEngine)
    err= fConnectEngine( &aCI, &engVersion, aPrgVersion, aDebugFlags );
  if (dbg) printf( "call err=%d\n", err );

//DEBUG_DB     ( aCI, MyMod, "ConnectEngine", "aCB=%08X eng=%08X prg=%08X aDebugFlags=%04X err=%d",
//                                             aCB, engVersion, aPrgVersion, aDebugFlags,  err );
  if    (fConnectEngine && err) return err;
  return NotFnd( aCI, "ConnectEngine" );
} // UI_Connect