Location: PHPKode > projects > phpSyncML > phpsyncml/get_response.php
head     1.1;
branch   1.1.1;
access   ;
symbols  start:1.1.1.1 vendor:1.1.1;
locks    ; strict;
comment  @# @;


1.1
date     2005.09.12.14.01.44;  author cyberpunk1971;  state Exp;
branches 1.1.1.1;
next     ;

1.1.1.1
date     2005.09.12.14.01.44;  author cyberpunk1971;  state Exp;
branches ;
next     ;


desc
@@



1.1
log
@Initial revision
@
text
@
#########################################
########################################
#
#    PHPSyncML API
#   phpsyncml.sourceforge.net
#
#   Copyrighted under GPL 2006
#
######################################
#######################################

<?
function get_response ($i,$source,$cmdref,$mesgid) {
$get_response = "<Results><CmdID>$i</CmdID><MsgRef>$mesgid</MsgRef><CmdRef>$cmdref</CmdRef><Meta><Type xmlns='syncml:metinf'>application/vnd.syncml-devinf+xml</Type></Meta><Item><Source><LocURI>./devinf11</LocURI></Source><Data><DevInf xmlns=\"syncml:devinf\"><Man>Knox County</Man><Mod>Knox County SyncML Pro</Mod><OEM>Knox County</OEM><DevID>lssync001</DevID><DevTyp>Server</DevTyp><DataStore><SourceRef>./contacts</SourceRef><Rx-Pref><CTType>text/x-vcard</CTType><VerCT>2.1</VerCT></Rx-Pref><Rx><CTType>text/vcard</CTType><VerCT>3.0</VerCT></Rx><Tx-Pref><CTType>text/x-vcard</CTType><VerCT>2.1</VerCT></Tx-Pref><Tx><CTType>text/vcard</CTType><VerCT>3.0</VerCT></Tx><SyncCap><SyncType>1</SyncType><SyncType>2</SyncType><SyncType>3</SyncType><SyncType>4</SyncType><SyncType>5</SyncType><SyncType>6</SyncType></SyncCap></DataStore><CTCap><CTType>text/x-vcard</CTType><PropName>BEGIN</PropName><ValEnum>VCARD</ValEnum><PropName>END</PropName><ValEnum>VCARD</ValEnum><PropName>VERSION</PropName><ValEnum>2.1</ValEnum><PropName>N</PropName><PropName>FN</PropName><PropName>TITLE</PropName><PropName>ORG</PropName><PropName>CATEGORIES</PropName><PropName>CLASS</PropName><PropName>TEL</PropName><PropName>EMAIL</PropName><PropName>ADR</PropName><PropName>NOTE</PropName><CTType>text/vcard</CTType><PropName>BEGIN</PropName><ValEnum>VCARD</ValEnum><PropName>END</PropName><ValEnum>VCARD</ValEnum><PropName>VERSION</PropName><ValEnum>3.0</ValEnum><PropName>N</PropName><PropName>FN</PropName><PropName>TITLE</PropName><PropName>ORG</PropName><PropName>CATEGORIES</PropName><PropName>CLASS</PropName><PropName>TEL</PropName><PropName>EMAIL</PropName><PropName>ADR</PropName><PropName>NOTE</PropName></CTCap></DevInf></Data></Item></Results>";
return $get_response;
}

function alert_response($i,$cmdref,$mesgid) {
	
	$alert_response = "<Status><CmdID>$i</CmdID><MsgRef>$mesgid</MsgRef><CmdRef>$cmdref</CmdRef><Cmd>Alert</Cmd><TargetRef>./contacts</TargetRef><SourceRef>./contacts</SourceRef><Data>200</Data><Item><Data><Anchor xmlns=\"syncml:metinf\"><Next>1119903597616</Next></Anchor></Data></Item></Status><Alert><CmdID>".($i+1)."</CmdID><Item><Target><LocURI>./contact</LocURI></Target><Source><LocURI>./contact</LocURI></Source><Meta><Anchor xmlns=\"syncml:metinf\"><Last>0</Last><Next>1119903960225</Next></Anchor></Meta></Item><Data>206</Data></Alert>";
return $alert_response;
}

function status_response($i,$comdref,$mesgid) {
	
	$stat = "<Status><CmdID>$i</CmdID><MsgRef>$mesgid</MsgRef><CmdRef>$cmdref</CmdRef><Cmd>Alert</Cmd><TargetRef>./contacts</TargetRef><SourceRef>contacts</SourceRef><Data>200</Data><Item><Data><Anchor xmlns=\"syncml:metinf\"><Last>20050629T132132Z</Last><Next>20050629T154536Z</Next></Anchor></Data></Item></Status>";
	
}

function add_contact() {
	
}

function replace_contact() {
	
}

function delete_contact() {
	
}
?>@


1.1.1.1
log
@Initial import.
@
text
@@
Return current item: phpSyncML