#ifndef IKDDIADDRBOOK_H
#define IKDDIADDRBOOK_H
/*@==========================================================================================

FILE            : IKDDIAddrBook.h

SERVICES        : IKDDIAddrBook Access Interface

DESCRIPTION     :

PUBLIC CLASSES  :

INITIALIZATION AND SEQUENCING REQUIREMENTS :

      Copyright ｩ 1999-2005 QUALCOMM Incorporated.
               All Rights Reserved.
            QUALCOMM Proprietary/GTDR

===========================================================================================*/

/*@==========================================================================================

                        EDIT HISTORY FOR MODULE

When        Who    Keyword             what, where, why
----------  -----  ------------------  ------------------------------------------------------
11/16/05                               Create file
===========================================================================================*/

/*@==========================================================================================
 INCLUDES AND VARIABLE DEFINITIONS
===========================================================================================*/
/*@------------------------------------------------------------------------------------------
   Defines
-------------------------------------------------------------------------------------------*/

/*@------------------------------------------------------------------------------------------
   Include Files
-------------------------------------------------------------------------------------------*/
#include "AEE.h"
#include "AEEInterface.h"


/*@------------------------------------------------------------------------------------------
   Constant Declarations
-------------------------------------------------------------------------------------------*/
/*@ KADDR_PARM_XXX */
#define KADDR_PARM_LASTMODIFY       (0)   /*@ 最終更新日時 */
#define KADDR_PARM_GROUPNO          (1)   /*@ グループ番号 */
#define KADDR_PARM_SECRET           (2)   /*@ シークレット設定(0:Off, 1:On) */
#define KADDR_PARM_NAME             (3)   /*@ 氏名    */
#define KADDR_PARM_YOMI             (4)   /*@ よみ    */
#define KADDR_PARM_TELNO1           (5)   /*@ 電話番号１ */
#define KADDR_PARM_TELNO2           (6)   /*@ 電話番号２ */
#define KADDR_PARM_TELNO3           (7)   /*@ 電話番号３ */
#define KADDR_PARM_EMAILADDR1       (8)   /*@ Eメールアドレス１ */
#define KADDR_PARM_EMAILADDR2       (9)   /*@ Eメールアドレス２ */
#define KADDR_PARM_EMAILADDR3       (10)  /*@ Eメールアドレス３ */
#define KADDR_PARM_EXTENSIONNO1     (11)  /*@ 内線番号１ */
#define KADDR_PARM_EXTENSIONNO2     (12)  /*@ 内線番号２ */
#define KADDR_PARM_IMADDR           (13)  /*@ IMアドレス */
#define KADDR_PARM_BIRTHDAY         (14)  /*@ 誕生日(YYYYMMDD形式) */
#define KADDR_PARM_HOBBY            (15)  /*@ 趣味    */
#define KADDR_PARM_ADDRESS          (16)  /*@ 住所    */
#define KADDR_PARM_URL              (17)  /*@ URL     */
#define KADDR_PARM_MEMO             (18)  /*@ メモ    */
#define KADDR_PARM_CONSTELLATION    (19)  /*@ 星座    */
#define KADDR_PARM_BLOOD            (20)  /*@ 血液型  */
#define KADDR_PARM_LOCATION         (21)  /*@ 位置情報*/
#define KADDR_PARM_PHOTO            (22)  /*@ PHOTO（実ファイル名） */
#define KADDR_PARM_POSTALNO         (23)  /*@ 郵便番号*/
#define KADDR_PARM_ORGANIZATION     (24)  /*@ 組織名称*/
#define KADDR_PARM_SECTION          (25)  /*@ 所属    */


/*@------------------------------------------------------------------------------------------
   Type Declarations
-------------------------------------------------------------------------------------------*/
/*@ KDDIAddrTelAttr */
#define KDDIADDRTELATTR_OTHER       (0)   /*@ その他 */
#define KDDIADDRTELATTR_CELLULAR    (1)   /*@ 携帯   */
#define KDDIADDRTELATTR_PHS         (2)   /*@ PHS    */
#define KDDIADDRTELATTR_HOME        (3)   /*@ 自宅   */
#define KDDIADDRTELATTR_OFFICE      (4)   /*@ 仕事   */
#define KDDIADDRTELATTR_FAX         (5)   /*@ FAX    */

typedef  uint32   KDDIAddrTelAttr;

/*@ KDDIAddrEmailAttr */
#define KDDIADDREMAILATTR_OTHER     (0)   /*@ その他 */
#define KDDIADDREMAILATTR_CELLULAR  (1)   /*@ 携帯   */
#define KDDIADDREMAILATTR_PHS       (2)   /*@ PHS    */
#define KDDIADDREMAILATTR_HOME      (3)   /*@ 自宅   */
#define KDDIADDREMAILATTR_SCHOOL    (4)   /*@ 学校   */
#define KDDIADDREMAILATTR_OFFICE    (5)   /*@ 仕事   */

typedef  uint32   KDDIAddrEmailAttr;

/*@ KDDIAddrLocationAttr */
#define KDDIADDRLOCATIONATTR_OTHER  (0)   /*@ その他 */
#define KDDIADDRLOCATIONATTR_HOME   (1)   /*@ 自宅   */
#define KDDIADDRLOCATIONATTR_WORK   (2)   /*@ 会社   */

typedef  uint32   KDDIAddrLocationAttr;

/*@ KDDIAddrBlood */
#define KDDIADDRBLOOD_NULL          (0)   /*@ 選択なし*/
#define KDDIADDRBLOOD_A             (1)   /*@ A型     */
#define KDDIADDRBLOOD_B             (2)   /*@ B型     */
#define KDDIADDRBLOOD_O             (3)   /*@ O型     */
#define KDDIADDRBLOOD_AB            (4)   /*@ AB型    */

typedef  uint32   KDDIAddrBlood;

/*@ KDDIAddrCons */
#define KDDIADDRCONS_NULL           (0)   /*@ 選択なし*/
#define KDDIADDRCONS_ARIES          (1)   /*@ 牡羊座  */
#define KDDIADDRCONS_TAURUS         (2)   /*@ 牡牛座  */
#define KDDIADDRCONS_GEMINI         (3)   /*@ 双子座  */
#define KDDIADDRCONS_CANCER         (4)   /*@ 蟹座    */
#define KDDIADDRCONS_LEO            (5)   /*@ 獅子座  */
#define KDDIADDRCONS_VIRGO          (6)   /*@ 乙女座  */
#define KDDIADDRCONS_LIBRA          (7)   /*@ 天秤座  */
#define KDDIADDRCONS_SCORPIO        (8)   /*@ 蠍座    */
#define KDDIADDRCONS_SAGITTARIUS    (9)   /*@ 射手座  */
#define KDDIADDRCONS_CAPRICORN      (10)  /*@ 山羊座  */
#define KDDIADDRCONS_AQUARIUS       (11)  /*@ 水瓶座  */
#define KDDIADDRCONS_PISCES         (12)  /*@ 魚座    */
#define KDDIADDRCONS_OPHIUCHUS      (13)  /*@ 蛇遣座  */

typedef  uint32   KDDIAddrCons;

typedef struct _KDDIAddrBookInfo{
   uint16  wMaxMemNo;                     /*@ 最大メモリ番号 */
   uint16  wResisteredRecord;             /*@ 登録済みレコード数 */
   uint16  wSelectableRecord;             /*@ 指定されたフィールド情報が登録されているレコードの数 */
} KDDIAddrBookInfo;

typedef struct _KDDIMemoryNoStatus{
   uint16  wStatus;                       /*@ レコード状態 */
   uint32  dwLastModify;                  /*@ 最終更新日時 */
} KDDIMemoryNoStatus;

typedef void(* PFNADDRRECORDCB)(void * pUser, uint16 wMemoryNum, uint32 dwPropertyID, int nError);

typedef struct IKDDIAddrBook  IKDDIAddrBook;
typedef struct IKDDIAddrRec   IKDDIAddrRec;

/*@------------------------------------------------------------------------------------------
   Macros Declarations
-------------------------------------------------------------------------------------------*/

/*@==========================================================================================
 FUNCTION DECLARATIONS AND INLINE FUNCTION DEFINITIONS
===========================================================================================*/
/*@------------------------------------------------------------------------------------------
   IKDDIAddrBook Interface
-------------------------------------------------------------------------------------------*/
/*@------------------------------------------------------------------------------------------
   Interface Definitions
-------------------------------------------------------------------------------------------*/
AEEINTERFACE(IKDDIAddrBook)
{
   INHERIT_IBase(IKDDIAddrBook);
   int     (* SetRecord)      (IKDDIAddrBook * pIAddrBook, IKDDIAddrRec * pIAddrRec, uint16 wMemoryNo, boolean bUpdate);
   int     (* GetRecord)      (IKDDIAddrBook * pIAddrBook, uint16 wMemoryNo, IKDDIAddrRec ** ppIAddrRec);
   int     (* SearchRecords)  (IKDDIAddrBook * pIAddrBook, uint16 nSearchMode, char * pInbuf, uint16 * pMemArray, uint32 * pdwArraySize, char * pszOption);
   int     (* GetGroupName)   (IKDDIAddrBook * pIAddrBook, uint16 wGroupNum, char * pszGroupName, int * pnSize);
   int     (* GetMemNoStatus) (IKDDIAddrBook * pIAddrBook, KDDIMemoryNoStatus * pKMemoryNoStatus);
   int     (* Remove)         (IKDDIAddrBook * pIAddrBook, uint16 wMemoryNo);
   boolean (* HandleEvent)    (IKDDIAddrBook * pIAddrBook, AEEEvent evt, uint16 wp, uint32 dwp);
   int     (* SelectUI)       (IKDDIAddrBook * pIAddrBook, PFNADDRRECORDCB pfn, void * pUser, char * pszOption);
   int     (* GetInfo)        (IKDDIAddrBook * pIAddrBook, KDDIAddrBookInfo * pKAddrBookInfo, char * pszOption);
};

/*@------------------------------------------------------------------------------------------
   Access Macros
-------------------------------------------------------------------------------------------*/
#define IKDDIADDRBOOK_AddRef(p)                                 AEEGETPVTBL((p),IKDDIAddrBook)->AddRef((p))
#define IKDDIADDRBOOK_Release(p)                                AEEGETPVTBL((p),IKDDIAddrBook)->Release((p))
#define IKDDIADDRBOOK_SetRecord(p, pAR, wM, bU)                 AEEGETPVTBL((p),IKDDIAddrBook)->SetRecord((p), (pAR), (wM), (bU))
#define IKDDIADDRBOOK_GetRecord(p, wM, ppAR)                    AEEGETPVTBL((p),IKDDIAddrBook)->GetRecord((p), (wM), (ppAR))
#define IKDDIADDRBOOK_SearchRecords(p, nS, pIn, pM, pdwA, pszO) AEEGETPVTBL((p),IKDDIAddrBook)->SearchRecords((p), (nS), (pIn), (pM), (pdwA), (pszO))
#define IKDDIADDRBOOK_GetGroupName(p, wG, pszG, pnS)            AEEGETPVTBL((p),IKDDIAddrBook)->GetGroupName((p), (wG), (pszG), (pnS))
#define IKDDIADDRBOOK_GetMemNoStatus(p, pMNS)                   AEEGETPVTBL((p),IKDDIAddrBook)->GetMemNoStatus((p), (pMNS))
#define IKDDIADDRBOOK_Remove(p, wM)                             AEEGETPVTBL((p),IKDDIAddrBook)->Remove((p), (wM))
#define IKDDIADDRBOOK_HandleEvent(p, ev, wp, dwp)               AEEGETPVTBL((p),IKDDIAddrBook)->HandleEvent((p), (ev), (wp), (dwp))
#define IKDDIADDRBOOK_SelectUI(p, pfn, pU, pszO)                AEEGETPVTBL((p),IKDDIAddrBook)->SelectUI((p), (pfn), (pU), (pszO))
#define IKDDIADDRBOOK_GetInfo(p, pABI, pszO)                    AEEGETPVTBL((p),IKDDIAddrBook)->GetInfo((p), (pABI), (pszO))


/*@------------------------------------------------------------------------------------------
   IKDDIAddrRec Interface
-------------------------------------------------------------------------------------------*/
/*@------------------------------------------------------------------------------------------
   Interface Definitions
-------------------------------------------------------------------------------------------*/
AEEINTERFACE(IKDDIAddrRec)
{
   INHERIT_IBase(IKDDIAddrRec);
   int     (* SetProp) (IKDDIAddrRec * pIAddrRec, uint32 dwPropertyID, int32 p1, int32 p2);
   int     (* GetProp) (IKDDIAddrRec * pIAddrRec, uint32 dwPropertyID, int32 * p1, int32 * p2);
};

/*@------------------------------------------------------------------------------------------
   Access Macros
-------------------------------------------------------------------------------------------*/
#define IKDDIADDRREC_AddRef(p)               AEEGETPVTBL((p),IKDDIAddrRec)->AddRef((p))
#define IKDDIADDRREC_Release(p)              AEEGETPVTBL((p),IKDDIAddrRec)->Release((p))
#define IKDDIADDRREC_SetProp(p, dwP, p1, p2) AEEGETPVTBL((p),IKDDIAddrRec)->SetProp((p), (dwP), (p1), (p2))
#define IKDDIADDRREC_GetProp(p, dwP, p1, p2) AEEGETPVTBL((p),IKDDIAddrRec)->GetProp((p), (dwP), (p1), (p2))


#endif /*@ End of IKDDIADDRBOOK_H */

