org.symbian.tools.wrttools.previewer/preview/data/contact_data.js
author Eugene Ostroukhov <eugeneo@symbian.org>
Fri, 23 Apr 2010 17:08:33 -0700
changeset 320 147e1da95419
parent 210 0f7abfd6ae62
child 333 895153411a80
permissions -rw-r--r--
NPE in JSDT walkaround

/**
 * Copyright (c) 2009-2010 Symbian Foundation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
 * Initial Contributors:
 * Symbian Foundation - initial contribution.
 * Contributors:
 */

/**
 * SAPI Sample Data - Contacts
 */

(function(){


	var data_contacts = [{
	    "id": "",
	    "FirstName": {
	        "Label": "First name",
	        "Value": "Alice"
	    },
	    "LastName": {
	        "Label": "Last name",
	        "Value": "Moller"
	    },
	    "LandPhoneGen": {
	        "Label": "Telephone",
	        "Value": "0230328732"
	    },
	    "SyncClass": {
	        "Label": "Synchronisation",
	        "Value": "private"
	    }
	}, {
	    "id": "",
	    "FirstName": {
	        "Label": "First name",
	        "Value": "Amy"
	    },
	    "LastName": {
	        "Label": "Last name",
	        "Value": "Kammer"
	    },
	    "LandPhoneGen": {
	        "Label": "Telephone",
	        "Value": "0492303652"
	    },
	    "SyncClass": {
	        "Label": "Synchronisation",
	        "Value": "private"
	    }
	}, {
	    "id": "",
	    "SyncClass": {
	        "Label": "Synchronisation",
	        "Value": "private"
	    },
	    "LastName": {
	        "Label": "Last name",
	        "Value": "Bierman"
	    },
	    "FirstName": {
	        "Label": "First name",
	        "Value": "Michael"
	    },
	    "MobilePhoneGen": {
	        "Label": "Mobile",
	        "Value": "4084256071"
	    }
	}, {
	    "id": "",
	    "FirstName": {
	        "Label": "First name",
	        "Value": "Ralph"
	    },
	    "LastName": {
	        "Label": "Last name",
	        "Value": "Jacmor"
	    },
	    "LandPhoneGen": {
	        "Label": "Telephone",
	        "Value": "0432443343"
	    },
	    "SyncClass": {
	        "Label": "Synchronisation",
	        "Value": "private"
	    }
	}, {
	    "id": "",
	    "FirstName": {
	        "Label": "First name",
	        "Value": "Robert"
	    },
	    "LastName": {
	        "Label": "Last name",
	        "Value": "Richards"
	    },
	    "LandPhoneGen": {
	        "Label": "Telephone",
	        "Value": "+4443433434"
	    },
	    "SyncClass": {
	        "Label": "Synchronisation",
	        "Value": "private"
	    }
	}, {
	    "id": "",
	    "FirstName": {
	        "Label": "First name",
	        "Value": "Ursula"
	    },
	    "LastName": {
	        "Label": "Last name",
	        "Value": "West"
	    },
	    "LandPhoneGen": {
	        "Label": "Telephone",
	        "Value": "0213443434"
	    },
	    "SyncClass": {
	        "Label": "Synchronisation",
	        "Value": "private"
	    }
	}];  
	

    var data_groups = [{
        "id": "",
        "GroupLabel": "TestGroupName"
    }, {
        "id": "",
        "GroupLabel": "Silver club #5488",
        "Contents": ["", "", "", "", "", ""]
    }, {
        "id": "",
        "GroupLabel": "The buddies #9926"
    }, {
        "id": "",
        "GroupLabel": "Football team #5940",
        "Contents": ["", ""]
    }, {
        "id": "",
        "GroupLabel": "Science group #2742",
        "Contents": ["", "", "", "", "", ""]
    }, {
        "id": "",
        "GroupLabel": "Rockers #3062",
        "Contents": ["", "", "", "", "", ""]
    }];
		
		
    var data_database = [{
        "DBUri": "cntdb://c:contacts.cdb"
    },{
        "DBUri": "sim://global_adn"
	}];
    
    
    /**
     * register data!
     */
    device.implementation.loadData('Service.Contact', 'Contact', data_contacts);
    device.implementation.loadData('Service.Contact', 'Group', data_groups);
    device.implementation.loadData('Service.Contact', 'Database', data_database);
    
})()