deleting rests sync
authorVolker Birk <vb@pep-project.org>
Tue, 30 Apr 2019 22:38:52 +0200
branchsync
changeset 359234410422e806
parent 3591 19d842c279ee
child 3593 5085ee740dda
deleting rests
src/pEpEngine.c
src/pEpEngine.h
     1.1 --- a/src/pEpEngine.c	Tue Apr 30 22:34:04 2019 +0200
     1.2 +++ b/src/pEpEngine.c	Tue Apr 30 22:38:52 2019 +0200
     1.3 @@ -1594,14 +1594,6 @@
     1.4              &_session->get_own_address_binding_from_contact, NULL);
     1.5      assert(int_result == SQLITE_OK);
     1.6  
     1.7 -    // int_result = sqlite3_prepare_v2(_session->db, sql_set_device_group,
     1.8 -    //         (int)strlen(sql_set_device_group), &_session->set_device_group, NULL);
     1.9 -    // assert(int_result == SQLITE_OK);
    1.10 -    // 
    1.11 -    // int_result = sqlite3_prepare_v2(_session->db, sql_get_device_group,
    1.12 -    //         (int)strlen(sql_get_device_group), &_session->get_device_group, NULL);
    1.13 -    // assert(int_result == SQLITE_OK);
    1.14 -
    1.15      int_result = sqlite3_prepare_v2(_session->db, sql_set_pgp_keypair,
    1.16              (int)strlen(sql_set_pgp_keypair), &_session->set_pgp_keypair,
    1.17              NULL);
    1.18 @@ -1885,10 +1877,6 @@
    1.19                  sqlite3_finalize(session->was_id_for_revoke_contacted);   
    1.20              if (session->get_last_contacted)
    1.21                  sqlite3_finalize(session->get_last_contacted);                                       
    1.22 -            // if (session->set_device_group)
    1.23 -            //     sqlite3_finalize(session->set_device_group);
    1.24 -            // if (session->get_device_group)
    1.25 -            //     sqlite3_finalize(session->get_device_group);
    1.26              if (session->set_pgp_keypair)
    1.27                  sqlite3_finalize(session->set_pgp_keypair);
    1.28              if (session->exists_identity_entry)
    1.29 @@ -3421,94 +3409,6 @@
    1.30      return PEP_STATUS_OK;
    1.31  }
    1.32  
    1.33 -// DYNAMIC_API PEP_STATUS set_device_group(
    1.34 -//         PEP_SESSION session,
    1.35 -//         const char *group_name
    1.36 -//     )
    1.37 -// {
    1.38 -//     int result;
    1.39 -// 
    1.40 -//     assert(session);
    1.41 -// 
    1.42 -//     if (!(session && group_name))
    1.43 -//         return PEP_ILLEGAL_VALUE;
    1.44 -// 
    1.45 -//     // 1. Get own user_id
    1.46 -//     char* user_id = NULL;
    1.47 -//     PEP_STATUS status = get_default_own_userid(session, &user_id);
    1.48 -// 
    1.49 -//     // No user_id is returned in this case, no need to free;
    1.50 -//     if (status != PEP_STATUS_OK)
    1.51 -//         return status;
    1.52 -// 
    1.53 -//     // 2. Set device group
    1.54 -//     sqlite3_reset(session->set_device_group);
    1.55 -//     if(group_name){
    1.56 -//         sqlite3_bind_text(session->set_device_group, 1, group_name, -1,
    1.57 -//                 SQLITE_STATIC);
    1.58 -//     } else {
    1.59 -//         sqlite3_bind_null(session->set_device_group, 1);
    1.60 -//     }
    1.61 -// 
    1.62 -//     sqlite3_bind_text(session->set_device_group, 2, user_id, -1,
    1.63 -//             SQLITE_STATIC);
    1.64 -// 
    1.65 -//     result = sqlite3_step(session->set_device_group);
    1.66 -//     sqlite3_reset(session->set_device_group);
    1.67 -// 
    1.68 -//     free(user_id);
    1.69 -// 
    1.70 -//     if (result != SQLITE_DONE)
    1.71 -//         return PEP_CANNOT_SET_PERSON;
    1.72 -// 
    1.73 -//     return PEP_STATUS_OK;
    1.74 -// }
    1.75 -// 
    1.76 -// DYNAMIC_API PEP_STATUS get_device_group(PEP_SESSION session, char **group_name)
    1.77 -// {
    1.78 -//     PEP_STATUS status = PEP_STATUS_OK;
    1.79 -//     int result;
    1.80 -// 
    1.81 -//     assert(session);
    1.82 -//     assert(group_name);
    1.83 -// 
    1.84 -//     if (!(session && group_name))
    1.85 -//         return PEP_ILLEGAL_VALUE;
    1.86 -// 
    1.87 -//     // 1. Get own user_id
    1.88 -//     char* user_id = NULL;
    1.89 -//     status = get_default_own_userid(session, &user_id);
    1.90 -// 
    1.91 -//     // No user_id is returned in this case, no need to free;
    1.92 -//     if (status != PEP_STATUS_OK)
    1.93 -//         return status;
    1.94 -// 
    1.95 -//     // 2. get device group
    1.96 -//     sqlite3_reset(session->get_device_group);
    1.97 -//     sqlite3_bind_text(session->get_device_group, 1, user_id, -1,
    1.98 -//             SQLITE_STATIC);
    1.99 -// 
   1.100 -//     result = sqlite3_step(session->get_device_group);
   1.101 -//     switch (result) {
   1.102 -//     case SQLITE_ROW: {
   1.103 -//         const char *_group_name = (const char *)sqlite3_column_text(session->get_device_group, 0);
   1.104 -//         if(_group_name){
   1.105 -//             *group_name = strdup(_group_name);
   1.106 -//                 if(*group_name == NULL)
   1.107 -//                     status = PEP_OUT_OF_MEMORY;
   1.108 -//         }
   1.109 -//         break;
   1.110 -//     }
   1.111 -// 
   1.112 -//     default:
   1.113 -//         status = PEP_RECORD_NOT_FOUND;
   1.114 -//     }
   1.115 -// 
   1.116 -//     free(user_id);
   1.117 -//     sqlite3_reset(session->get_device_group);
   1.118 -//     return status;
   1.119 -// }
   1.120 -
   1.121  DYNAMIC_API PEP_STATUS set_identity_flags(
   1.122          PEP_SESSION session,
   1.123          pEp_identity *identity,
     2.1 --- a/src/pEpEngine.h	Tue Apr 30 22:34:04 2019 +0200
     2.2 +++ b/src/pEpEngine.h	Tue Apr 30 22:38:52 2019 +0200
     2.3 @@ -865,40 +865,6 @@
     2.4          const char* default_id,
     2.5          const char* alias_id);
     2.6  
     2.7 -
     2.8 -// // set_device_group() - update own person's device group
     2.9 -// //
    2.10 -// //    parameters:
    2.11 -// //        session (in)        session handle
    2.12 -// //        group_name (in)     new group name
    2.13 -// //
    2.14 -// //    return value:
    2.15 -// //        PEP_STATUS_OK = 0             device group was updated
    2.16 -// //        PEP_CANNOT_SET_PERSON         update failed
    2.17 -// 
    2.18 -// DYNAMIC_API PEP_STATUS set_device_group(
    2.19 -//         PEP_SESSION session,
    2.20 -//         const char *group_name
    2.21 -//     );
    2.22 -// 
    2.23 -// // get_device_group() - get own person's device group
    2.24 -// //
    2.25 -// //    parameters:
    2.26 -// //        session (in)        session handle
    2.27 -// //        group_name (in)     new group name
    2.28 -// //
    2.29 -// //    return value:
    2.30 -// //        PEP_STATUS_OK = 0             couldn't get device group
    2.31 -// //        PEP_RECORD_NOT_FOUND          update failed
    2.32 -// //
    2.33 -// //    caveat:
    2.34 -// //        the ownerships of group_name is going to the caller
    2.35 -// 
    2.36 -// DYNAMIC_API PEP_STATUS get_device_group(
    2.37 -//         PEP_SESSION session, 
    2.38 -//         char **group_name
    2.39 -//     );
    2.40 -
    2.41  // set_identity_flags() - update identity flags on existing identity
    2.42  //
    2.43  //    parameters:
    2.44 @@ -1519,8 +1485,6 @@
    2.45                       char **sign, 
    2.46                       size_t *sign_size);
    2.47  
    2.48 -const char *get_device_name(PEP_SESSION session);
    2.49 -
    2.50  #ifdef __cplusplus
    2.51  }
    2.52  #endif