Exemplo n.º 1
0
//Virtual destructor.  Making derived classes deallocate properly.
TKSyncherInterface::~TKSyncherInterface(void)
{
	IPInterface notify;
	notify.m_type=notify.DEREGISTER;
	notify.v_strings.push_back(m_source);

	byte buf[4096];
	notify.WriteToBuffer(buf);
	DllInterface::SendData(syncherspace::m_syncher_app,buf);
}
Exemplo n.º 2
0
//call to have the source rescan a particular source directory.  effectively recalculating all the sha1's
void TKSyncherInterface::RescanSource(const char* source_name)
{
	if(source_name==NULL)
		return;
	IPInterface notify;
	notify.m_type=notify.SOURCERESCAN;
	notify.v_strings.push_back(string(source_name));  //push_back the source_name so that the syncher can only rescan a certain source

	byte buf[4096];
	notify.WriteToBuffer(buf);
	DllInterface::SendData(syncherspace::m_syncher_app,buf);	
}
Exemplo n.º 3
0
//source is the name of the source that you want to subscribe to.  if that source contacts this trapperkeeper, it will only synch if someone is subscribed to that source.
void TKSyncherInterface::Register(Dll* pDll,char *source){
	if(mb_registered)
		return;

	Interface::Register(pDll);
	m_source=source;

	IPInterface notify;
	notify.m_type=notify.REGISTER;
	notify.v_strings.push_back(m_source);

	byte buf[4096];
	notify.WriteToBuffer(buf);
	if(DllInterface::SendData(syncherspace::m_syncher_app,buf))
		mb_registered=true;
}