update the new plugin rewrite

This commit is contained in:
Ibrahim Hadeed 2016-04-30 13:43:47 -04:00
parent 654cef2377
commit 937138378b

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin'; import {Plugin, Cordova, InstanceProperty, CordovaInstance} from './plugin';
export interface ContactProperties { export interface ContactProperties {
/** A globally unique identifier. */ /** A globally unique identifier. */
@ -58,53 +58,61 @@ export class Contact {
private _objectInstance: any; private _objectInstance: any;
get id(): string { @InstanceProperty
return this._objectInstance.id; get id() {return; }
}
set id(val: string) { @InstanceProperty
this._objectInstance.id = val; get displayName() {return; }
}
get displayName(): string { @InstanceProperty
return this._objectInstance.displayName; get nickname() {return; }
}
set displayName(val: string){ @InstanceProperty
this._objectInstance.displayName = val; get phoneNumbers() {return; }
}
get name(): ContactName { @InstanceProperty
return this._objectInstance.name; get emails() {return; }
}
set name(val: ContactName){ @InstanceProperty
this._objectInstance.name = val; get addresses() {return; }
}
get nickname(): string { @InstanceProperty
return this._objectInstance.nickname; get ims() {return; }
}
set nickname(val: string){ @InstanceProperty
this._objectInstance.nickname = val; get organizations() {return; }
}
get phoneNumbers(): ContactField[] { @InstanceProperty
return this._objectInstance.phoneNumbers; get birthday() {return; }
}
set phoneNumbers(val: ContactField[]){ @InstanceProperty
this._objectInstance.phoneNumbers = val; get note() {return; }
}
get emails(): ContactField[] { @InstanceProperty
return this._objectInstance.emails; get photos() {return; }
}
set emails(val: ContactField[]){ @InstanceProperty
this._objectInstance.emails = val; get categories() {return; }
}
get addresses(): ContactAddress[] { @InstanceProperty
return this._objectInstance.addresses; get urls() {return; }
}
set addresses(val: ContactAddress[]){
this._objectInstance.addresses = val;
}
constructor () { constructor () {
// creat eobj this._objectInstance = navigator.contacts.create();
} }
clone(): Contact {
// TODO manually clone the object
return;
}
@CordovaInstance()
remove(): Promise<any> {return; }
@CordovaInstance()
save(): Promise<any> {return; }
} }
interface ContactError { interface ContactError {